3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array(1,2,3,4,5,6,7,8,9); function soma_1($chave, $valor){ $array[$chave][$valor] = $valor + 1; } function echo_array($chave, $valor){ echo $valor + '<br/>'; } array_walk($array,'soma_1'); array_walk($array,'echo_array');
Output for 7.1.0
Warning: A non-numeric value encountered in /in/eSOAQ on line 10 0 Warning: A non-numeric value encountered in /in/eSOAQ on line 10 1 Warning: A non-numeric value encountered in /in/eSOAQ on line 10 2 Warning: A non-numeric value encountered in /in/eSOAQ on line 10 3 Warning: A non-numeric value encountered in /in/eSOAQ on line 10 4 Warning: A non-numeric value encountered in /in/eSOAQ on line 10 5 Warning: A non-numeric value encountered in /in/eSOAQ on line 10 6 Warning: A non-numeric value encountered in /in/eSOAQ on line 10 7 Warning: A non-numeric value encountered in /in/eSOAQ on line 10 8
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.14
012345678