bug25652.phpt 379 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #25652 (Calling Global functions dynamically fails from Class scope)
  3. --FILE--
  4. <?php
  5. function testfunc ($var) {
  6. echo "testfunc $var\n";
  7. }
  8. class foo {
  9. public $arr = array('testfunc');
  10. function bar () {
  11. $this->arr[0]('testvalue');
  12. }
  13. }
  14. $a = new foo ();
  15. $a->bar ();
  16. ?>
  17. --EXPECT--
  18. testfunc testvalue