xref: /PHP-8.2/tests/lang/bug25652.phpt (revision f8d79582)
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