3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ function true(){ return true; } function false(){ return false; } function t(){ assert($this->true() === $this->false()); } } $x = new A; $x->t();
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 AssertionError: assert($this->true() === $this->false()) in /in/Q8ZUB:9 Stack trace: #0 /in/Q8ZUB(9): assert(false, 'assert($this->t...') #1 /in/Q8ZUB(15): A->t() #2 {main} thrown in /in/Q8ZUB on line 9
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
Warning: assert(): assert($this->true() === $this->false()) failed in /in/Q8ZUB on line 9
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Warning: assert(): Assertion failed in /in/Q8ZUB on line 9

preferences:
124.33 ms | 402 KiB | 185 Q