<?php class A_B { function f() { echo 'hi'; } } class A { const B = 'A_B'; } $x = new A::B; $x->f();
Standard input is empty
Standard output is empty
PHP Parse error: syntax error, unexpected 'B' (T_STRING), expecting variable (T_VARIABLE) or '$' in /home/pkgJzW/prog.php on line 13