3v4l.org

run code in 300+ PHP versions simultaneously
<?php $testArray = array( 'percy' => array( 'philip' => array( 'mitch' => array( 'percy' => 'hatcherson', 'mitch' => 'anderson' ) ), 'mitch' => array( 'mitchell', 'anderson', 'percy' => array( 'percy', 'hatcherson' ), 'mitchell' => 'thomas mitchell anderson', 'percy' => 'percy philip hatcherson' ) ) ); $newArray = array(); function recursiveArrayColumn ($array, $index, $helper = array()) { $helper = array_column($v, $index); foreach ($array as $k => $v) { if (is_array($v)) { $helper[] = recursiveArrayColumn($v, $index, $helper) } } } var_dump(recursiveArrayColumn($testArray, 'percy'));

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.200.0150.04912.39
5.4.190.0120.04712.39
5.4.180.0110.04512.39
5.4.170.0120.04312.39
5.4.160.0130.04312.39
5.4.150.0150.05412.39
5.4.140.0120.04712.08
5.4.130.0160.04612.06
5.4.120.0130.04912.03
5.4.110.0090.04512.02
5.4.100.0140.04312.02
5.4.90.0100.05412.02
5.4.80.0200.05712.02
5.4.70.0130.04312.02
5.4.60.0210.06812.02
5.4.50.0130.04512.02
5.4.40.0150.04212.01
5.4.30.0140.04312.01
5.4.20.0140.05012.00
5.4.10.0160.05012.00
5.4.00.0130.05111.50
5.3.270.0160.04812.72
5.3.260.0150.06012.72
5.3.250.0110.04712.72
5.3.240.0160.04912.72
5.3.230.0130.04412.71
5.3.220.0130.05812.68
5.3.210.0130.04212.68
5.3.200.0100.04612.68
5.3.190.0120.04512.68
5.3.180.0140.04312.67
5.3.170.0150.04912.67
5.3.160.0160.04312.67
5.3.150.0090.04712.67
5.3.140.0140.04912.66
5.3.130.0210.05612.66
5.3.120.0160.05312.66
5.3.110.0150.04812.66
5.3.100.0120.04912.12
5.3.90.0140.04312.10
5.3.80.0180.06012.09
5.3.70.0130.04212.09
5.3.60.0130.04912.07
5.3.50.0130.06412.02
5.3.40.0140.04712.02
5.3.30.0120.04711.98
5.3.20.0160.06211.76
5.3.10.0130.04911.73
5.3.00.0100.04911.71

preferences:
142.32 ms | 1394 KiB | 7 Q