<?php
class A{
public static function __callStatic($name,$args){
call_user_func_array(array(__CLASS_,$name),$args);
}
private static function test($args)
{
echo implode('/',$args);
}
}
A::test(array(1,2,3));
Fatal error: Uncaught Error: Undefined constant "__CLASS_" in /in/XeLgN:5
Stack trace:
#0 /in/XeLgN(13): A::__callStatic('test', Array)
#1 {main}
thrown in /in/XeLgN on line 5
Process exited with code 255.
Warning: Use of undefined constant __CLASS_ - assumed '__CLASS_' (this will throw an Error in a future version of PHP) in /in/XeLgN on line 5
Warning: call_user_func_array() expects parameter 1 to be a valid callback, class '__CLASS_' not found in /in/XeLgN on line 5
Output for 7.3.0 - 7.3.1
Warning: Use of undefined constant __CLASS_ - assumed '__CLASS_' (this will throw an Error in a future version of PHP) in /in/XeLgN on line 5
Warning: call_user_func_array() expects parameter 1 to be a valid callback, class '__CLASS_' not found in /in/XeLgN on line 5
Process exited with code 139.
Notice: Use of undefined constant __CLASS_ - assumed '__CLASS_' in /in/XeLgN on line 5
Warning: call_user_func_array() expects parameter 1 to be a valid callback, class '__CLASS_' not found in /in/XeLgN on line 5