<?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>Fri, 09 Jan 2009 22:17:34 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[SitePoint PHP Blog: Dynamic global functions in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/8879</guid>
      <link>http://www.phpdeveloper.org/news/8879</link>
      <description><![CDATA[<p>
On the SitePoint PHP blog, there's a <a href="http://www.sitepoint.com/blogs/2007/10/21/dynamic-global-functions-in-php/">quick tutorial</a> from <i>Troels Knak-Nielsen</i> about the creation and use of dynamic global functions in your PHP application:
</p>
<blockquote>
Like many others, I prefer to use procedural PHP as a template language. While PHP's syntax makes it a practical choice for this, there is a problem with embedding dynamic content. [...] A single letter, regular function is undoubtedly the simplest way to extend PHP's syntax. Thinking about it, it's fairly obvious, but it just never occurred to me. [...] There is a problem though; Since this is such a good name for a function, chances are that someone else would use it for something different, or perhaps even for the same.
</blockquote>
<p>
As a more viable solution, he recommends <a href="http://www.sitepoint.com/blogs/2007/10/21/dynamic-global-functions-in-php/">going dynamic</a> and creating fumctions (via the call_user_func_* functions) and an addition to the $GLOBALS superglobal to make calling the custom function simpler.
</p>]]></description>
      <pubDate>Mon, 22 Oct 2007 11:12:00 -0500</pubDate>
    </item>
  </channel>
</rss>
