3v4l.org

run code in 300+ PHP versions simultaneously
<?php $num = ''; var_dump(abs($num));
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Fatal error: Uncaught TypeError: abs(): Argument #1 ($num) must be of type int|float, string given in /in/DXrcp:4 Stack trace: #0 /in/DXrcp(4): abs('') #1 {main} thrown in /in/DXrcp on line 4
Process exited with code 255.
Output for 7.4.0 - 7.4.33
int(0)

preferences:
119.1 ms | 401 KiB | 117 Q