php-src/Zend/tests/closure_031.phpt
Dmitry Stogov 1c94ff0595 Implement engine exceptions
RFC: https://wiki.php.net/rfc/engine_exceptions_for_php7

Pending changes regarding naming of BaseException and whether it
should be an interface.
2015-03-09 14:01:32 +01:00

20 lines
370 B
PHP

--TEST--
Closure 031: Closure properties with custom error handlers
--FILE--
<?php
function foo($errno, $errstr, $errfile, $errline) {
echo "Error: $errstr\n";
}
set_error_handler('foo');
$foo = function() {
};
try {
var_dump($foo->a);
} catch (EngineException $ex) {
echo "Error: {$ex->getMessage()}\n";
}
?>
--EXPECT--
Error: Closure object cannot have properties