<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Mon, 20 May 2013 04:00:50 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Jeremy Cook's Blog: Recursive Closures in PHP 5.3]]></title>
      <guid>http://www.phpdeveloper.org/news/14959</guid>
      <link>http://www.phpdeveloper.org/news/14959</link>
      <description><![CDATA[<p>
In <a href="http://jeremycook.ca/2010/08/01/recursive-closures-in-php-5-3/">this recent post</a> from <i>Jeremy Cook</i> he take a look at an interesting use of <a href="http://php.net/manual/en/functions.anonymous.php">closures</a> in PHP - using them recursively to strip slashes off a string.
</p>
<blockquote>
One thing all of my projects have in them is code to remove the quotes added so I can handle appropriate escaping myself. This [example from the PHP manual] works perfectly but it does end up creating a function in the global namespace which is only called once. A perfect job for a closure.
</blockquote>
<p>
He includes an example of how to do it with a normal, globally-defined function and how to handle it with a closure (that calls itself via an <a href="http://php.net/array_map">array_map</a>) - a closure contained inside of itself with the string variable passed in by reference. Then, when it's done stripping out slashes, the closure is dropped and nothing new is added to the global namespace.
</p>]]></description>
      <pubDate>Fri, 13 Aug 2010 13:07:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Arul Pradad's Blog:  Saving XML from Flash, using PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/5652</guid>
      <link>http://www.phpdeveloper.org/news/5652</link>
      <description><![CDATA[<p>
On <i>Arul Pradad</i>'s blog today, there's <a href="http://arulprasad.blogspot.com/2006/06/saving-xml-from-flash-using-php.html">a  quick post</a> talking about a simple way to save the XML coming from a Flash file with PHP.
</p>
<blockquote>
<p>
I was trying to create a XML file on the server, using PHP. The XML string was being sent from Flash, by adding the same as a property to a LoadVars obj. ( Since I had to send few other data items as well - other than the XML string, I couldn't use Flash's XML.sendAndLoad method.
</p>
</blockquote>
<p>
He <a href="http://arulprasad.blogspot.com/2006/06/saving-xml-from-flash-using-php.html">shows the code</a> that was giving him troubles and traces the path he took to discover the ultimate problem with the XML - the quotes in the file were being escaped, resulting in PHP's inability to parse it correctly. A simple call to stripslashes solved that, and the app works just fine.
</p>]]></description>
      <pubDate>Wed, 21 Jun 2006 18:39:53 -0500</pubDate>
    </item>
  </channel>
</rss>
