php-src/Zend/tests/anonymous_func_003.phpt

16 lines
245 B
Plaintext
Raw Normal View History

2008-05-11 03:15:13 +00:00
--TEST--
Using throw $var with anonymous function return
--FILE--
<?php
try {
$a = create_function('', 'return new Exception("test");');
throw $a();
} catch (Exception $e) {
var_dump($e->getMessage() == 'test');
}
?>
--EXPECT--
bool(true)