3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $A = array(9,4,-3,-10); $mean = array_sum($A) / count($A); foreach($A as $key => $i) { $devs[$key] = pow($num - $mean, 2); print_r($devs[$key]); } ?>
Output for 5.0.4 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined variable: num in /in/v7ApU on line 6 0 Notice: Undefined variable: num in /in/v7ApU on line 6 0 Notice: Undefined variable: num in /in/v7ApU on line 6 0 Notice: Undefined variable: num in /in/v7ApU on line 6 0
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: num in /in/v7ApU on line 6 0 Notice: Undefined variable: num in /in/v7ApU on line 6 0 Notice: Undefined variable: num in /in/v7ApU on line 6 0 Notice: Undefined variable: num in /in/v7ApU on line 6 0