3v4l.org

run code in 300+ PHP versions simultaneously
<?php const A = 'b::c'; class B { static function C() { echo __METHOD__; } } //valid call to \B::C() constant('A')(); // class A not found //new A; // Call to undefined function A() A(); // parse error, this is not supported //{A}();
Output for 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
B::C Fatal error: Uncaught Error: Call to undefined function A() in /in/c16hv:17 Stack trace: #0 {main} thrown in /in/c16hv on line 17
Process exited with code 255.

preferences:
48.86 ms | 853 KiB | 4 Q