3v4l.org

run code in 200+ 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 - 7.2.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