3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump("0x10" + 0); var_dump("0x10" % 20); var_dump(abs("0x10")); var_dump("0x10" == 16);
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
Warning: A non-numeric value encountered in /in/7Y4q9 on line 3 int(0) Warning: A non-numeric value encountered in /in/7Y4q9 on line 4 int(0) Fatal error: Uncaught TypeError: abs(): Argument #1 ($num) must be of type int|float, string given in /in/7Y4q9:5 Stack trace: #0 /in/7Y4q9(5): abs('0x10') #1 {main} thrown in /in/7Y4q9 on line 5
Process exited with code 255.
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
Notice: A non well formed numeric value encountered in /in/7Y4q9 on line 3 int(0) Notice: A non well formed numeric value encountered in /in/7Y4q9 on line 4 int(0) int(0) bool(false)
Output for 7.0.0 - 7.0.20, 7.3.32 - 7.3.33
int(0) int(0) int(0) bool(false)
Output for 5.4.2 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28
int(16) int(0) int(16) bool(true)

preferences:
215.71 ms | 402 KiB | 257 Q