#24413 [Fbk->Opn]: exception example provided on php site fails
| From: | tleake at ebuyer dot com | Date: | Thu, 03 Jul 2003 10:15:07 +0000 |
| Subject: | #24413 [Fbk->Opn]: exception example provided on php site fails | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-43169@lists.php.net to get a copy of this message | ||
ID: 24413
User updated by: tleake at ebuyer dot com
Reported By: tleake at ebuyer dot com
-Status: Feedback
+Status: Open
Bug Type: Zend Engine 2 problem
Operating System: mandrake linux 9.0
PHP Version: 5.0.0b1 (beta1)
New Comment:
Sure its http://www.php.net/zend-engine-2.php in
the section exceptions
Previous Comments:
------------------------------------------------------------------------
[2003-07-03 05:01:49] stas@php.net
Could you please point out where is this code on the site?
------------------------------------------------------------------------
[2003-06-30 11:34:35] tleake at ebuyer dot com
Description:
------------
Trying the code below from the php site fails with the following error.
This is php-5.0.0 beta1 compiled with --disable-all under linux
Call to undefined method exception::__construct()
Reproduce code:
---------------
<?php
class MyExceptionFoo extends Exception {
function __construct($exception) {
parent::__construct($exception);
}
}
try {
throw new MyExceptionFoo("Hello");
} catch (MyException $exception) {
print $exception->getMessage();
}
?>
Expected result:
----------------
hello
Actual result:
--------------
<br />
<b>Fatal error</b>: Call to undefined method exception::__construct()
in <b>/home/tony/software/web/php-5.0.0b1/sapi/cgi/test.php</b> on line
<b>4</b><br />
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24413&edit=1