php-src/tests/lang/bug25652.phpt

23 lines
379 B
Plaintext
Raw Normal View History

2003-11-29 07:15:31 +00:00
--TEST--
Bug #25652 (Calling Global functions dynamically fails from Class scope)
--FILE--
<?php
2020-02-03 21:52:20 +00:00
function testfunc ($var) {
echo "testfunc $var\n";
}
2018-09-16 17:16:42 +00:00
2020-02-03 21:52:20 +00:00
class foo {
public $arr = array('testfunc');
function bar () {
$this->arr[0]('testvalue');
}
}
2018-09-16 17:16:42 +00:00
2020-02-03 21:52:20 +00:00
$a = new foo ();
$a->bar ();
2018-09-16 17:16:42 +00:00
2003-11-29 07:15:31 +00:00
?>
--EXPECT--
testfunc testvalue