<?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>Sun, 26 May 2013 01:29:18 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Lars Strojny: Functional programming in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19055</guid>
      <link>http://www.phpdeveloper.org/news/19055</link>
      <description><![CDATA[<p>
<i>Lars Strojny</i> has <a href="http://usrportage.de/archives/941-Functional-programming-in-PHP.html">a new post</a> that takes an in-depth look at the current state of <a href="http://en.wikipedia.org/wiki/Functional_programming">functional programming</a> in PHP:
</p>
<blockquote>
PHP has traditionally been a simple, procedural language that took a lot of inspiration from C and Perl. Both syntax wise and making sure function signatures are as convoluted as possible. PHP 5.0 introduced a proper object model but you know all of that already. PHP 5.3 introduced closures and PHP 5.4 improved closures very much (hint: $this is available per default).
</blockquote>
<p>
He starts by defining functional programming for those not familiar with the concept. With this understanding, he looks at what PHP has to offer that will help make this definition a reality, things like <a href="http://php.net/call_user_func_array">call_user_func_array</a> and <a href="http://php.net/closures">closures</a>. He includes some code examples comparing the PHP structures to other languages and their features (like Haskell and Ruby). The post also gets a bit more practical with a "real world" example of a script that calculates the totals from the set of items in a shopping cart using a <a href="https://github.com/lstrojny/functional-php">helper library</a> to do some of the basic functional handling.
</p>]]></description>
      <pubDate>Thu, 17 Jan 2013 14:21:38 -0600</pubDate>
    </item>
  </channel>
</rss>
