3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private static function test(int $a) { echo 1; } } class B extends A { private function test(int $a) { } }
Output for 8.1.23 - 8.1.34, 8.2.10 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
Output for 7.0.0 - 7.0.15, 7.1.0 - 7.1.1
Fatal error: Cannot make static method A::test() non static in class B in /in/HHA28 on line 15
Process exited with code 255.

preferences:
68.15 ms | 910 KiB | 4 Q