3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function step1() { self::step2(); } public function step2() { echo "Waza"; } } A::step1();
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
Fatal error: Uncaught Error: Non-static method A::step2() cannot be called statically in /in/fNIkJ:5 Stack trace: #0 /in/fNIkJ(14): A::step1() #1 {main} thrown in /in/fNIkJ on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.6 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.33
Deprecated: Non-static method A::step2() should not be called statically in /in/fNIkJ on line 5 Waza
Output for 7.3.32 - 7.3.33
Waza
Output for 5.6.0 - 5.6.30
Strict Standards: Non-static method A::step2() should not be called statically in /in/fNIkJ on line 5 Waza

preferences:
156.26 ms | 401 KiB | 205 Q