<?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, 29 Aug 2008 00:54:22 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Paul Jones' Blog: Exceptional command-line PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/10790</guid>
      <link>http://www.phpdeveloper.org/news/10790</link>
      <description><![CDATA[<p>
In a <a href="http://paul-m-jones.com/?p=279">new post</a> to his blog, <i>Paul Jones</i> anout a small issue when working with the PHP 5.2.5 command line functionality - a segfault if you extend the Exception class.
</p>
<blockquote>
When executing code at the command line using php -r and PHP 5.2.5, be sure not to extend the Exception class. It will cause a segmentation fault.
</blockquote>
<p>
He includes examples of the issue that would cause the problem and the <a href="http://bugs.php.net/?id=45750">bug</a> he's filed in an effort to get it fixed.
</p>]]></description>
      <pubDate>Fri, 08 Aug 2008 09:34:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PEAR Blog: PEAR Group Meeting Minutes 2008-07-13]]></title>
      <guid>http://www.phpdeveloper.org/news/10630</guid>
      <link>http://www.phpdeveloper.org/news/10630</link>
      <description><![CDATA[<p>
A <a href="http://blog.pear.bluga.net/2008/07/17/pear-group-meeting-minutes-2008-07-13/">new entry</a> has been posted to the PEAR blog with the latest minutes for the group's July 13th meeting.
</p>
<blockquote>
Some highlights from the meeting include new/upcoming RFCs for package naming schemes, exception handling in PHP 5.3, and a vote on extending the current PEAR2 Policies. Heavy stuff, check it out!
</blockquote>
<p>
You can check out the <a href="http://wiki.pear.php.net/index.php/MeetingMinutes20080713">full notes here</a> on the PEAR portion of the PHP.net wiki.
</p>]]></description>
      <pubDate>Thu, 17 Jul 2008 14:08:11 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Weier O'Phinney's Blog: Migrating OOP Libraries and Frameworks to PHP 5.3]]></title>
      <guid>http://www.phpdeveloper.org/news/10529</guid>
      <link>http://www.phpdeveloper.org/news/10529</link>
      <description><![CDATA[<p>
<i>Matthew Weier O'Phinney</i> recently <a href="http://weierophinney.net/matthew/archives/181-Migrating-OOP-Libraries-and-Frameworks-to-PHP-5.3.html">posted about</a> a method he's come up with for migrating your object-oriented libraries (including frameworks) over to the upcoming PHP 5.3 version of the language.
</p>
<blockquote>
With PHP 5.3 coming up on the horizon, I'm of course looking forward to using namespaces. 
</blockquote>
<p>
He gives an example of how useful these namespaces can be for you and your code, but points out one failing point - trying to define classes in a namespace that are named the same as a built-in keyword for PHP. There's already been a suggestion to add a captial "I" in front of the class name to prevent this collision.
</p>
<p>
There's also the problem of throwing custom exceptions - unless you use the namespace properly your script will just throw a default exception.
</p>]]></description>
      <pubDate>Wed, 02 Jul 2008 10:24:02 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Comparing Files and Databases with PHP Benchmarking Applications]]></title>
      <guid>http://www.phpdeveloper.org/news/10136</guid>
      <link>http://www.phpdeveloper.org/news/10136</link>
      <description><![CDATA[<p>
DevShed is wrapping up their series looking at benchmarking your PHP applications with <A href="http://www.devshed.com/c/a/PHP/Comparing-Files-and-Databases-with-PHP-Benchmarking-Applications/">the third part</a> - a look at comparing execution times of scripts that can either pull from a database or from a flat file.
</p>
<blockquote>
This large, complex subject offers numerous possibilities for experimentation, which means that you'll surely have tons of fun creating timing systems with PHP. [...] his article, then, will be focused on evaluating different scripts that fetch sets of records, first from a database, and then from flat files.
</blockquote>
<p>
They use the Timer class they defined in a previous part of the series and wrap it around both a database class (pulling user information from a MySQL database) and a fetch to a flat file for similar information. General exceptions are handled as a part of the resource connection class.
</p>]]></description>
      <pubDate>Thu, 08 May 2008 07:58:38 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stefan Priebsch's Blog: Turning errors into exceptions]]></title>
      <guid>http://www.phpdeveloper.org/news/10080</guid>
      <link>http://www.phpdeveloper.org/news/10080</link>
      <description><![CDATA[<p>
In a <a href="http://inside.e-novative.de/archives/115-Turning-errors-into-exceptions.html">recent blog entry</a> <i>Stefan Priebsch</i> shows how to take an error thrown by your script and turn it into an exception (to make things like catchable fatal errors).
</p>
<blockquote>
While I would personally prefer an exception to be thrown in the first place, it is pretty easy to convert errors to exceptions in PHP.
</blockquote>
<p>
His example is pretty simple - you set a custom error handler in your script that pulls in the error information and tosses an exception based on the error number the handler is given. Then you can use the try/catch method to see if your script has tossed an exception of the fatal error type. Nice simple solution to handle an interesting little problem.
</p>]]></description>
      <pubDate>Wed, 30 Apr 2008 12:53:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Martynas Jusevicius' Blog: PHP 5 Features: Exceptions]]></title>
      <guid>http://www.phpdeveloper.org/news/9852</guid>
      <link>http://www.phpdeveloper.org/news/9852</link>
      <description><![CDATA[<p>
On his blog today <i>Martynas Jusevicius</i> <a href="http://www.xml.lt/Blog/2008/03/25/PHP+5+features%3A+Exceptions">talks about</a> a feature that was new in PHP5 - Exceptions:
</p>
<blockquote>
A useful new feature in PHP 5 is <a href="http://devzone.zend.com/node/view/id/1714#Heading5">exception handling</a> via the try/throw/catch paradigm. An exception may be thrown and caught. If an exception is thrown in code surrounded by try, the following statements will not be executed, and the exception will be handled by the first matching catch block.
</blockquote>
<p>
He gives a high-level overview of how Exceptions in PHP5 work and includes a simple example from his work with his <a href="http://www.xml.lt/Resources/Framework">DIY Framework</a>.
</p>]]></description>
      <pubDate>Tue, 25 Mar 2008 10:21:11 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Displaying Meaningful Error Messages when Auto Loading Classes in PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/9314</guid>
      <link>http://www.phpdeveloper.org/news/9314</link>
      <description><![CDATA[<p>
DevShed has <a href="http://www.devshed.com/c/a/PHP/Displaying-Meaningful-Error-Messages-when-Auto-Loading-Classes-in-PHP-5/">posted the next part</a> of their series looking at handling errors thrown by the __autoload functionality of PHP. This time they enhance their previous method and allow for custom error messaging.
</p>
<blockquote>
In this last article of the series I'm going to introduce some additional modifications to the current signature of the "__autoload()" function to make it throw exceptions that display more useful error messages.
</blockquote>
<p>
They start by <a href="http://www.devshed.com/c/a/PHP/Displaying-Meaningful-Error-Messages-when-Auto-Loading-Classes-in-PHP-5/1/">setting up the application</a> to have something to build from (a series of PHP scripts). They add on the exception handling to throw the custom error (the "class not found" they mentioned).
</p>]]></description>
      <pubDate>Wed, 26 Dec 2007 11:56:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Improving Exception Throwing when Auto Loading Classes in PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/9268</guid>
      <link>http://www.phpdeveloper.org/news/9268</link>
      <description><![CDATA[<p>
DevShed continues their looks at autoloading classes in PHP5 today with <a href="http://www.devshed.com/c/a/PHP/Improving-Exception-Throwing-when-Auto-Loading-Classes-in-PHP-5/">this new tutorial</a> focusing on catching and handling any errors that might be thrown in the process.
</p>
<blockquote>
This is the third article in the series on how to auto load classes in PHP 5. This article will demonstrate how to trigger exceptions in a way that can be caught by the corresponding "catch()" block.  [...] Nonetheless, this issue can be fixed with relative ease. That will be the goal of this third article of the series. So if you're interested in learning how this solution will be implemented, don't waste any more time and start reading now!
</blockquote>
<p>
They start by <a href="http://www.devshed.com/c/a/PHP/Improving-Exception-Throwing-when-Auto-Loading-Classes-in-PHP-5/1/">looking at</a> throwing an exception with the __autoload so that the script can catch it. The go back to mention the method they'd talked about before - using just eval() - and then show the "new and improved" method of handling the result with a try/catch block instead of a direct output.
</p>]]></description>
      <pubDate>Tue, 18 Dec 2007 12:56:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Throwing Basic Exceptions When Auto Loading Classes in PHP 5 ]]></title>
      <guid>http://www.phpdeveloper.org/news/9225</guid>
      <link>http://www.phpdeveloper.org/news/9225</link>
      <description><![CDATA[<p>
DevShed has <a href="http://www.devshed.com/c/a/PHP/Throwing-Basic-Exceptions-When-Auto-Loading-Classes-in-PHP-5/">posted the second part</a> of their series looking at handling exceptions in a PHP5 application today. This one focuses on capturing the errors thrown when your script autoloads classes.
</p>
<blockquote>
Bearing in mind this intrinsic limitation exposed by the "__autoload()" magic function when it comes to triggering exceptions at runtime, in this second article  of the series I'm going to show you some basic workarounds that you can implement to provide this function with the ability to throw exceptions when a determined source class fails to be included.
</blockquote>
<p>
They give <a href="http://www.devshed.com/c/a/PHP/Throwing-Basic-Exceptions-When-Auto-Loading-Classes-in-PHP-5/1/">two examples</a> of the use of the __autoload function as well as a method to capture the fatal errors that it might throw (using an eval inside of it to check on the class).
</p>]]></description>
      <pubDate>Wed, 12 Dec 2007 07:55:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: A Primer On Postgres Exception Handling For The PHP Developer, Part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/9060</guid>
      <link>http://www.phpdeveloper.org/news/9060</link>
      <description><![CDATA[<p>
PHPBuilder.com has <a href="http://www.phpbuilder.com/columns/robert_bernier20071115.php3">posted part two</a> of a series they're working through introducing PHP developers to the world of exception handling in the Postgres database.
</p>
<blockquote>
Last week we left off with an example where notice, exception and log levels are sent to the client. This week we present more POSTGRES exception examples, and continue with our article on Postgres exception handling.
</blockquote>
<p>
They create a few examples:
</p>
<ul>
<li>handling other error conditions with OTHERS
<li>using f_ex2
<li>returning NO_DATA_FOUND and TOO_MANY_ROWS
<li>handling exceptions like table constraints
<li>nested exceptions
<li>using f_ex5
<li>a RAISE EXCEPTION dilemma
<li>using f_ext1
</ul>]]></description>
      <pubDate>Fri, 16 Nov 2007 09:35:00 -0600</pubDate>
    </item>
  </channel>
</rss>
