xref: /PHP-7.4/tests/lang/bug25652.phpt (revision 782352c5)
1--TEST--
2Bug #25652 (Calling Global functions dynamically fails from Class scope)
3--FILE--
4<?php
5
6	function testfunc ($var) {
7		echo "testfunc $var\n";
8	}
9
10	class foo {
11		public $arr = array('testfunc');
12		function bar () {
13			$this->arr[0]('testvalue');
14		}
15	}
16
17	$a = new foo ();
18	$a->bar ();
19
20?>
21--EXPECT--
22testfunc testvalue
23