<?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 07:40:21 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Fabien Potencier's Blog: On PHP 5.3, Lambda Functions, and Closures]]></title>
      <guid>http://www.phpdeveloper.org/news/12363</guid>
      <link>http://www.phpdeveloper.org/news/12363</link>
      <description><![CDATA[<p>
In <a href="http://fabien.potencier.org/article/17/on-php-5-3-lambda-functions-and-closures">this new post</a> to his blog <i>Fabien Potencier</i> looks at two of the much-hyped features of the upcoming PHP 5.x series release (5.3) - closures and lambda functions.
</p>
<blockquote>
I won't talk too much about what lambda functions or closures are, as you can find many good blog posts describing them in great details. To sum up, a lambda function is an anonymous PHP function that can be stored in a variable and passed as an argument to other functions or methods. A closure is a lambda function that is aware of its surrounding context.
</blockquote>
<p>
He includes several examples including how they would work with a few of the array functions, an implementation of the Y-combinator method (as written by <a href="http://php100.wordpress.com/2009/04/13/php-y-combinator/">Stanislav Malyshev</a>) and how they can be used to create dependency injection functionality.
</p>]]></description>
      <pubDate>Fri, 17 Apr 2009 10:29:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP 10.1 Blog: Y-Combinator in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12337</guid>
      <link>http://www.phpdeveloper.org/news/12337</link>
      <description><![CDATA[<p>
New from the PHP 10.0 blog today is <a href="http://php100.wordpress.com/2009/04/13/php-y-combinator/">this look</a> at trying to set up recursive closures in the upcoming PHP 5.3 release (it includes closures, but it doesn't look like this is possible). Instead, <i>Stas</i> suggests the <a href="http://en.wikipedia.org/wiki/Y_combinator">Y combinator</a> method as an alternative.
</p>
<blockquote>
One of the ways to do it is to use Y combinator function, which allows, by application of dark magic and friendly spirits from other dimensions, to convert non-recursive code to recursive code. [...] Doing <a href="http://ioreader.com/2007/05/03/php-closures/">Y-combinator in PHP was attempted before</a> (and <a href="http://agent101.livejournal.com/5601.html">here</a>), but now I think it works better. It could be even nicer if PHP syntax allowed chaining function invocations - ($foo($bar))($baz) - but for now it doesn't.
</blockquote>
<p>
His (less than ideal) first method throws in some variable variables and a separate factoral function  and his second passes in a factoral value of itself to call itself the correct number of times.
</p>]]></description>
      <pubDate>Tue, 14 Apr 2009 11:17:19 -0500</pubDate>
    </item>
  </channel>
</rss>
