mirror of
https://github.com/php/php-src.git
synced 2024-12-02 22:34:55 +08:00
b6f76aca54
Reuse existing arg freeing loop instead of duplicating it. Additionally also handle deprecated in DO_FCALL_BY_NAME.
44 lines
785 B
PHP
44 lines
785 B
PHP
--TEST--
|
|
Check that arguments are freed when calling a deprecated function
|
|
--FILE--
|
|
<?php
|
|
|
|
set_error_handler(function($code, $msg) {
|
|
throw new Error($msg);
|
|
});
|
|
|
|
try {
|
|
ezmlm_hash(new stdClass);
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
$ret = new stdClass;
|
|
try {
|
|
$ret = ezmlm_hash(new stdClass);
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
try {
|
|
$fn = 'ezmlm_hash';
|
|
$fn(new stdClass);
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
$ret = new stdClass;
|
|
try {
|
|
$fn = 'ezmlm_hash';
|
|
$ret = $fn(new stdClass);
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Function ezmlm_hash() is deprecated
|
|
Function ezmlm_hash() is deprecated
|
|
Function ezmlm_hash() is deprecated
|
|
Function ezmlm_hash() is deprecated
|