3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(1,2,3); $string = current($a); $i = 0; while($b = next($a) && strlen($string.current()) < 2){ $string .= $b; } echo $string;
based on vZZcL
Output for 5.3.0 - 7.1.0
Warning: current() expects exactly 1 parameter, 0 given in /in/sn4rg on line 5 Warning: current() expects exactly 1 parameter, 0 given in /in/sn4rg on line 5 11
Output for 4.3.0 - 5.2.17
Warning: Wrong parameter count for current() in /in/sn4rg on line 5 Warning: Wrong parameter count for current() in /in/sn4rg on line 5 11