3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $rows = array_fill(0, 3, array_fill('a', 'z', 'value')); print_r($value);die; $start1 = microtime(true); for ($i = 0; $i < 10000; ++$i) { $data = array_column($array, 0); } $end1 = microtime(true); echo 'array_column: ', $end1 - $start1, "\n"; $start2 = microtime(true); for ($i = 0; $i < 10000; ++$i) { $data = array(); foreach ($array as $r) { $data[] = $r[0]; } } $end2 = microtime(true); echo 'foreach: ', $end2 - $start2, "\n";
based on tbeNY
Output for 7.0.0 - 7.2.0
Warning: array_fill() expects parameter 1 to be integer, string given in /in/oGXlZ on line 3 Notice: Undefined variable: value in /in/oGXlZ on line 4
Output for 5.3.21 - 5.6.28
Warning: array_fill() expects parameter 1 to be long, string given in /in/oGXlZ on line 3 Notice: Undefined variable: value in /in/oGXlZ on line 4