cvs: ZendEngine2 /tests bug29368.phpt
| From: | Marcus Boerger | Date: | Sat, 02 Oct 2004 14:13:35 +0000 |
| Subject: | cvs: ZendEngine2 /tests bug29368.phpt | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-3069@lists.php.net to get a copy of this message | ||
helly Sat Oct 2 10:13:35 2004 EDT
Added files:
/ZendEngine2/tests bug29368.phpt
Log:
- Add new test
http://cvs.php.net/co.php/ZendEngine2/tests/bug29368.phpt?r=1.1&p=1
Index: ZendEngine2/tests/bug29368.phpt
+++ ZendEngine2/tests/bug29368.phpt
--TEST--
Bug #29368 (The destructor is called when an exception is thrown from the constructor)
--FILE--
<?
class Foo
{
function __construct()
{
echo __METHOD__ . "\n";
throw new Exception;
}
function __destruct()
{
echo __METHOD__ . "\n";
}
}
try
{
$bar = new Foo;
} catch(Exception $exc)
{
echo "Caught exception!\n";
}
unset($bar);
?>
===DONE===
--EXPECTF--
Foo::__construct
Caught exception!
===DONE===