3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo (int) "0xf" + 2.8,"\n"; echo (int) ("0xf" + 2.8),"\n"; echo intval("0xf", 16) + (int) 2.8,"\n"; echo intval("0xf", 0) + (int) 2.8;
Output for 7.1.0 - 7.3.0rc4
2.8 Notice: A non well formed numeric value encountered in /in/iY6t0 on line 3 2 17 17
Output for hhvm-3.10.1 - 3.22.0, 7.0.0 - 7.0.31
2.8 2 17 17
Output for 4.3.0 - 5.6.38
2.8 17 17 17