3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array('9002209000'=>22.58, '3915909000'=>21.35, '8512302000'=>20.06, '7207190000'=>19.79, '6306120000'=>18.17, '5513130000'=>17.74, '7208400000'=>17.57, '7210492000'=>17.17, '0904209000'=>16.99 ); echo "<pre>"; $b = array_slice($a, 0, 20, true); print_r($b); echo "</pre>";
Output for 5.0.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<pre>Array ( [9002209000] => 22.58 [3915909000] => 21.35 [8512302000] => 20.06 [7207190000] => 19.79 [6306120000] => 18.17 [5513130000] => 17.74 [7208400000] => 17.57 [7210492000] => 17.17 [0904209000] => 16.99 ) </pre>
Output for 4.3.0 - 5.0.1
<pre> Warning: Wrong parameter count for array_slice() in /in/QkbjJ on line 15 </pre>