3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A1 { public function __call($method, $args) { echo "__call"; } public static function __callStatic($method, $args) { echo "__callStatic"; } } class A2 { // A1 with private function test public function __call($method, $args) { echo "__call"; } public static function __callStatic($method, $args) { echo "__callStatic"; } private function test() {} } class B1 extends A1 { public function test(){ parent::test(); } } class B2 extends A2 { public function test(){ parent::test(); } } $test1 = new B1; $test2 = new B2; $test1->test(); $test2->test();
Output for 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
__call__call
Output for 5.3.0 - 5.3.2, 5.3.4 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30
__call__callStatic
Output for 5.3.3
__callStatic__callStatic

preferences:
269.98 ms | 401 KiB | 410 Q