3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = $b = "c"; var_dump(++$a); var_dump($b = $b + 1);
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.26, 8.4.1 - 8.4.13
string(1) "d" Fatal error: Uncaught TypeError: Unsupported operand types: string + int in /in/EogXX:6 Stack trace: #0 {main} thrown in /in/EogXX on line 6
Process exited with code 255.
Output for 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
string(1) "d" Warning: A non-numeric value encountered in /in/EogXX on line 6 int(1)
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20
string(1) "d" int(1)

preferences:
135.65 ms | 409 KiB | 5 Q