3v4l.org

run code in 500+ PHP versions simultaneously
<?php class X { public static function foo() { $this->assert(); } public function assert() {} } X::foo();
Output for 8.1.34, 8.2.0 - 8.2.32, 8.3.0 - 8.3.32, 8.4.1 - 8.4.24, 8.5.0 - 8.5.9
Fatal error: Uncaught Error: Using $this when not in object context in /in/u9ENa:7 Stack trace: #0 /in/u9ENa(14): X::foo() #1 {main} thrown in /in/u9ENa on line 7
Process exited with code 255.

preferences:
32.76 ms | 904 KiB | 4 Q