3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo implode(', ', array_column(array(range(0, 4), range(0, 6), range(0, 5)), 2)), "\n"; if (! function_exists('array_column')) { function array_column($array, $column_key, $idx=NULL) { $result = array(); foreach ($array as $i => $item) { $result[$idx ? $item[$idx]: $i] = $item[$column_key]; } return $result; } } class Artist implements ArrayAccess { public $artist_name; function __construct($name) { $this->artist_name = $name; } function offsetGet($name) { return $this->$name; } function offsetExists($name) { return isset($this->$name); } function offsetSet($name, $value) { $this->$name = $value; } function offsetUnset($name) { unset($this->$name); } } $artists = array( new Artist('Dali'), new Artist('Picasso'), new Artist('Titian'), ); var_dump(array_column($artists, 'artist_name')), "\n"; /*****/

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.260.0080.04312.40
5.4.250.0070.04112.40
5.4.240.0050.03812.40
5.4.230.0080.04412.39
5.4.220.0070.03512.39
5.4.210.0080.03812.39
5.4.200.0090.03612.39
5.4.190.0070.03812.39
5.4.180.0070.03812.39
5.4.170.0070.03812.40
5.4.160.0070.03612.39
5.4.150.0050.03812.39
5.4.140.0060.03812.08
5.4.130.0070.03812.06
5.4.120.0040.03812.03
5.4.110.0070.03612.03
5.4.100.0050.03712.02
5.4.90.0070.04012.02
5.4.80.0040.04612.03
5.4.70.0050.03712.02
5.4.60.0090.03612.02
5.4.50.0060.03812.02
5.4.40.0070.04012.00
5.4.30.0070.04012.00
5.4.20.0070.04112.00
5.4.10.0060.04712.00
5.4.00.0050.04511.50
5.3.280.0080.04412.71
5.3.270.0050.04212.72
5.3.260.0070.04212.72
5.3.250.0080.03712.72
5.3.240.0090.04212.72
5.3.230.0060.04312.71
5.3.220.0070.04212.68
5.3.210.0090.04012.68
5.3.200.0060.03812.68
5.3.190.0060.04112.68
5.3.180.0060.04212.68
5.3.170.0070.03812.67
5.3.160.0090.04312.67
5.3.150.0080.04512.67
5.3.140.0110.03912.66
5.3.130.0130.04312.65
5.3.120.0070.04712.66
5.3.110.0070.04912.66
5.3.100.0100.04312.13
5.3.90.0110.04312.10
5.3.80.0100.04012.09
5.3.70.0100.04012.09
5.3.60.0090.04112.08
5.3.50.0070.03812.02
5.3.40.0090.04112.02
5.3.30.0070.03611.98
5.3.20.0070.04411.76
5.3.10.0080.05111.72
5.3.00.0080.03811.71

preferences:
139.39 ms | 1394 KiB | 7 Q