3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $total = 10; $var = array(3,4,7); foreach($num as $num) { print_r($num); }
Output for 5.6.0 - 5.6.30, 7.1.0 - 7.3.0rc3
Notice: Undefined variable: num in /in/RJ2mi on line 6 Warning: Invalid argument supplied for foreach() in /in/RJ2mi on line 6
Output for hhvm-3.22.0
Notice: Undefined variable: num in /in/RJ2mi on line -1 Warning: Invalid argument supplied for foreach() in /in/RJ2mi on line -1
Output for hhvm-3.18.5 - 3.21.3
Notice: Undefined variable: num in /in/RJ2mi on line 8 Warning: Invalid argument supplied for foreach() in /in/RJ2mi on line 8