php-src/Zend/tests/call_to_abstract_method_args.phpt
Nikita Popov b6f76aca54 Improve exception handling for abstract/deprecated calls
Reuse existing arg freeing loop instead of duplicating it.

Additionally also handle deprecated in DO_FCALL_BY_NAME.
2019-09-04 15:19:21 +02:00

27 lines
479 B
PHP

--TEST--
Check that arguments are freed when a call to an abstract method throws
--FILE--
<?php
abstract class Test {
abstract static function method();
}
try {
Test::method(new stdClass);
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
$ret = new stdClass;
try {
$ret = Test::method(new stdClass);
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Cannot call abstract method Test::method()
Cannot call abstract method Test::method()