mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
9975986b7e
Closes GH-5999
28 lines
447 B
PHP
28 lines
447 B
PHP
--TEST--
|
|
Bug #46106 (Memory leaks when using global statement)
|
|
--FILE--
|
|
<?php
|
|
$foo = array(1);
|
|
|
|
function foobar($errno, $errstr, $errfile, $errline) { }
|
|
|
|
set_error_handler('foobar');
|
|
|
|
function test($x) {
|
|
global $foo;
|
|
|
|
$x->invokeArgs(array(0));
|
|
}
|
|
|
|
$x = new ReflectionFunction('str_pad');
|
|
try {
|
|
test($x);
|
|
} catch (TypeError $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
?>
|
|
DONE
|
|
--EXPECT--
|
|
str_pad() expects at least 2 arguments, 1 given
|
|
DONE
|