mirror of
https://github.com/php/php-src.git
synced 2024-12-18 14:30:35 +08:00
b6f76aca54
Reuse existing arg freeing loop instead of duplicating it. Additionally also handle deprecated in DO_FCALL_BY_NAME.
27 lines
479 B
PHP
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()
|