3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Example: chicken -> cnekcih $s = 'chicken'; echo substr($s, 0, 1) . strrev(substr($s, 1)); assert($s == 'cnekcih');
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
cnekcih Fatal error: Uncaught AssertionError: assert($s == 'cnekcih') in /in/kJOhH:5 Stack trace: #0 /in/kJOhH(5): assert(false, 'assert($s == 'c...') #1 {main} thrown in /in/kJOhH on line 5
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
cnekcih Warning: assert(): assert($s == 'cnekcih') failed in /in/kJOhH on line 5
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28
cnekcih Warning: assert(): Assertion failed in /in/kJOhH on line 5

preferences:
195.5 ms | 402 KiB | 270 Q