1--TEST-- 2In $a->$b[Y]() and $a->X[Y]() both $a->$b[Y] and $a->X[Y] represent a global function name 3--FILE-- 4<?php 5 class C {} 6 7 function foo($a, $b) { 8 echo "Called global foo($a, $b)\n"; 9 } 10 11 $name = 'functions'; 12 13 $c = new C; 14 $c->functions[0] = 'foo'; 15 $c->functions[1][2][3][4] = 'foo'; 16 17 $c->$name[0](1, 2); 18 $c->$name[1][2][3][4](3, 4); 19 20 $c->functions[0](5, 6); 21 $c->functions[1][2][3][4](7, 8); 22?> 23--EXPECT-- 24Called global foo(1, 2) 25Called global foo(3, 4) 26Called global foo(5, 6) 27Called global foo(7, 8) 28