3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $value = 358020; $new_array = array(); $blocks = array('a'=>20,'b'=>1000,'c'=>10000,'d'=>5000); foreach($blocks as $key => $val){ $num_times = $val/$value; array_push($new_array,$key,$num_times); } echo $new_array;
Output for 5.4.0 - 7.1.0
Notice: Array to string conversion in /in/0Dup3 on line 11 Array
Output for 4.3.0 - 5.3.29
Array