mirror of
https://github.com/php/php-src.git
synced 2025-01-27 06:03:45 +08:00
23 lines
323 B
Plaintext
23 lines
323 B
Plaintext
|
--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');
|
||
|
test($x);
|
||
|
?>
|
||
|
DONE
|
||
|
--EXPECT--
|
||
|
DONE
|