3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $num = array( 2154151, '55454', '.04484787', 'bloadh', '6564.465.654', '5653.54' ); foreach($numbers as $num){ if(!$number = filter_var($num, FILTER_VALIDATE_FLOAT)){ echo "$num is invalid"; }else{ echo "$num is valid"; } } ?>
Output for 5.1.0 - 7.1.0
Notice: Undefined variable: numbers in /in/QfCmd on line 5 Warning: Invalid argument supplied for foreach() in /in/QfCmd on line 5
Output for 4.3.0 - 4.3.10, 4.4.0 - 5.0.5
Warning: Invalid argument supplied for foreach() in /in/QfCmd on line 5
Output for 4.3.11