mirror of
https://github.com/php/php-src.git
synced 2024-10-17 22:42:38 +00:00
36 lines
583 B
PHP
Executable File
36 lines
583 B
PHP
Executable File
--TEST--
|
|
Bug #32290 (calling call_user_func_array() ends in infinite loop within child class)
|
|
--FILE--
|
|
<?php
|
|
|
|
class TestA
|
|
{
|
|
public function doSomething($i)
|
|
{
|
|
echo __METHOD__ . "($this)\n";
|
|
return --$i;
|
|
}
|
|
}
|
|
|
|
class TestB extends TestA
|
|
{
|
|
public function doSomething($i)
|
|
{
|
|
echo __METHOD__ . "($this)\n";
|
|
$i++;
|
|
if ($i >= 5) return 5;
|
|
return call_user_func_array(array("TestA","doSomething"), array($i));
|
|
}
|
|
}
|
|
|
|
$x = new TestB();
|
|
var_dump($x->doSomething(1));
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECTF--
|
|
TestB::doSomething(Object id #%d)
|
|
TestA::doSomething(Object id #%d)
|
|
int(1)
|
|
===DONE===
|