Error in doc 'Changes in PHP 5/Zend Engine 2.0?'
| From: | Alan D'Angelo - Media Beat Information Technology | Date: | Tue, 01 Jul 2003 14:46:45 +0000 |
| Subject: | Error in doc 'Changes in PHP 5/Zend Engine 2.0?' | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-153567@lists.php.net to get a copy of this message | ||
Hello,
the example of the section "Exceptions" of document
http://www.php.net/zend-engine-2.php
in Windows does not work:
Fatal error: Call to undefined method exception::__construct() in
c:\appserv\www\php5\exception.php on line 4
this works:
<?php
class MyExceptionFoo extends Exception {
function __construct($exception) {
parent::Exception($exception); // modified line
}
}
try {
throw new MyExceptionFoo("Hello");
} catch (MyExceptionFoo $exception) { // modified line
print $exception->getMessage();
}
?>