note 103754 deleted from class.errorexception by googleguy

From: Date: Wed, 12 Sep 2012 03:34:15 +0000
Subject: note 103754 deleted from class.errorexception by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-190632@lists.php.net to get a copy of this message
Note Submitter: vog at notjusthosting dot com ---- There is a contradiction between the class synopsis and the example code. The class synopsis states that the error code ($code) is the 2nd argument, while the example code provides the error code ($errno) as the 3rd argument. Assuming that the class synopsis is correct, the example code should be corrected to: <?php function exception_error_handler($errno, $errstr, $errfile, $errline ) { throw new ErrorException($errstr, $errno, 0, $errfile, $errline); } set_error_handler("exception_error_handler"); /* Trigger exception */ strpos(); ?>

« previous php.notes (#190632) next »