3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump('1.5'+' 2'); var_dump('1.5'+' a'); // Warning on PHP >= 7.1 var_dump('1.5'+(float)' 2a'); var_dump('1.5'+' 2a'); // Notice on PHP >= 7.1 var_dump('1.5'+(float)' 2a');
based on asKq9
Output for 7.1.0 - 7.2.6
float(3.5) Warning: A non-numeric value encountered in /in/9h376 on line 3 float(1.5) float(3.5) Notice: A non well formed numeric value encountered in /in/9h376 on line 5 float(3.5) float(3.5)
Output for 5.6.0 - 7.0.20
float(3.5) float(1.5) float(3.5) float(3.5) float(3.5)