<?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 00:42:02 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Lorna Mitchell's Blog: Declaring Static Methods in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15561</guid>
      <link>http://www.phpdeveloper.org/news/15561</link>
      <description><![CDATA[<p>
<i>Lorna Mitchell</i> has a new post to her blog today <a href="http://www.lornajane.net/posts/2010/Declaring-Static-Methods-in-PHP">talking about static methods</a> and how to use them correctly in your code (as discovered accidentally in her own code).
</p>
<blockquote>
I was confused recently to realise that I had accidentally called a static method in PHP dynamically from another part of my code; I expected PHP to output warnings when this is done. On closer inspection I discovered that: static functions can be called dynamically and dynamic functions generate an E_STRICT error if called statically.
</blockquote>
<p>
She illustrates with some sample code that, when run with E_ALL and E_STRICT throws a warning from the strict side about calling a non-static method statically. She also talks about why it throws this warning for the non-static call on a static method. She also explains why, when a static method is called dynamically, no warning is thrown.
</p>]]></description>
      <pubDate>Fri, 10 Dec 2010 08:40:45 -0600</pubDate>
    </item>
  </channel>
</rss>
