<?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>Tue, 18 Jun 2013 19:30:34 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Miro Svrtan: PHP Fatal errors into exceptions natively]]></title>
      <guid>http://www.phpdeveloper.org/news/18412</guid>
      <link>http://www.phpdeveloper.org/news/18412</link>
      <description><![CDATA[<p>
<i>Miro Svrtan</i> has <a href="http://www.mirosvrtan.me/blog/2012/08/php-fatal-errors-into-exceptions-natively/">a new post</a> today proposing something that could be added to help handle bad method calls in PHP apps - using the <a href="http://php.net/manual/en/class.badmethodcallexception.php">BadMethodCallException</a> (pre-existing) instead of throwing fatal errors.
</p>
<blockquote>
Using getter method that is not implemented will get you fatal error saying how undefined method is called and request will stop. [...] On the other hand if you would use public property all you would get is a notice saying how this property does not exist and rest of request would be completed. [...] I know that this is due to dynamic typing behavior of PHP and no I am not suggesting raising a notice if undefined method gets called but since 5.1.0 there is a BadMethodCallException class which would be perfect for this situation.
</blockquote>
<p>
There's been other people that have proposed the same idea as a bug, but nothing formal has been <a href="https://wiki.php.net/rfc">submitted as an RFC</a> to make the change. <i>Miro</i> is looking for feedback to find if others would be interested in this feature and want to make the proposal (<a href="http://www.mirosvrtan.me/blog/2012/08/php-fatal-errors-into-exceptions-natively/">leave comments here</a>).
</p>]]></description>
      <pubDate>Tue, 28 Aug 2012 10:08:39 -0500</pubDate>
    </item>
  </channel>
</rss>
