3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public $username; public $name; public function __construct($username) { $this->username = $username; $this->name = str_replace(' ', '', $username); } } $users = array( new User('user 1'), new User('user 2'), new User('user 3') ); function new_array_column($input , $column_key, $index_key = null) { $result = array(); array_walk($input, function($value, $key) use (&$result, $column_key, $index_key) { $result[empty($index_key) ? $key : is_object($value) ? $value->{$index_key} : $value[$index_key]] = empty($column_key) ? $value : (is_object($value) ? $value->{$column_key} : $value[$column_key]); }); return $result; } print_r( new_array_column($users, null, 'name') );

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)
8.4.120.0110.00924.02
8.4.110.0150.00618.63
8.4.100.0090.01118.69
8.4.90.0040.00420.59
8.4.80.0110.01020.37
8.4.70.0060.00318.16
8.4.60.0100.00718.73
8.4.50.0150.00819.39
8.4.40.0120.00619.55
8.4.30.0160.00320.29
8.4.20.0040.01520.65
8.4.10.0100.01019.56
8.3.250.0110.00718.81
8.3.240.0100.00916.75
8.3.230.0050.00416.68
8.3.220.0080.00318.87
8.3.210.0100.00916.72
8.3.200.0030.00516.71
8.3.190.0040.00418.70
8.3.180.0130.00518.25
8.3.170.0120.00620.70
8.3.160.0040.00418.60
8.3.150.0090.00920.55
8.3.140.0040.01118.55
8.3.130.0110.00016.64
8.3.120.0090.00020.47
8.3.110.0090.00620.94
8.3.100.0100.00624.06
8.3.90.0040.00426.77
8.3.80.0060.00316.77
8.3.70.0090.01316.75
8.3.60.0140.00718.31
8.3.50.0080.00817.49
8.3.40.0040.01118.87
8.3.30.0120.00318.72
8.3.20.0040.00420.78
8.3.10.0080.00018.94
8.3.00.0070.00021.85
8.2.290.0090.00720.46
8.2.280.0080.00720.01
8.2.270.0000.01916.82
8.2.260.0060.00318.78
8.2.250.0060.01218.36
8.2.240.0040.00717.30
8.2.230.0070.00322.58
8.2.220.0040.00437.54
8.2.210.0040.00426.77
8.2.200.0040.00416.50
8.2.190.0040.01416.58
8.2.180.0140.00725.92
8.2.170.0100.01018.97
8.2.160.0160.00322.96
8.2.150.0050.00325.66
8.2.140.0050.00324.66
8.2.130.0030.00626.16
8.2.120.0040.00426.16
8.2.110.0000.00921.00
8.2.100.0110.00017.78
8.2.90.0080.00018.98
8.2.80.0050.00317.97
8.2.70.0000.00817.91
8.2.60.0000.00817.91
8.2.50.0030.00618.10
8.2.40.0030.00519.23
8.2.30.0000.00819.13
8.2.20.0040.00417.82
8.2.10.0040.00418.73
8.2.00.0040.00419.27
8.1.330.0120.00722.00
8.1.320.0130.00516.19
8.1.310.0180.00018.16
8.1.300.0030.00618.05
8.1.290.0070.00330.84
8.1.280.0060.01225.92
8.1.270.0080.00022.08
8.1.260.0070.00026.35
8.1.250.0090.00028.09
8.1.240.0060.00322.39
8.1.230.0030.00717.83
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0000.00817.23
8.1.190.0060.00317.10
8.1.180.0060.00318.10
8.1.170.0000.00918.95
8.1.160.0020.00518.78
8.1.150.0000.00718.78
8.1.140.0000.00718.64
8.1.130.0080.00020.13
8.1.120.0080.00017.37
8.1.110.0040.00417.24
8.1.100.0000.00717.25
8.1.90.0040.00417.33
8.1.80.0050.00217.35
8.1.70.0070.00017.21
8.1.60.0000.00817.37
8.1.50.0040.00417.23
8.1.40.0000.00917.43
8.1.30.0050.00317.53
8.1.20.0030.00517.54
8.1.10.0030.00617.35
8.1.00.0040.00417.39
8.0.300.0050.00318.77
8.0.290.0020.00516.63
8.0.280.0030.00318.39
8.0.270.0030.00317.14
8.0.260.0000.00720.10
8.0.250.0030.00316.91
8.0.240.0070.00016.90
8.0.230.0050.00516.91
8.0.220.0070.00316.73
8.0.210.0030.00516.81
8.0.200.0070.00016.77
8.0.190.0000.00816.90
8.0.180.0030.00316.72
8.0.170.0050.00316.90
8.0.160.0060.00616.76
8.0.150.0030.00316.73
8.0.140.0090.00016.78
8.0.130.0030.00313.27
8.0.120.0000.00716.82
8.0.110.0000.00816.73
8.0.100.0020.00516.78
8.0.90.0070.00016.67
8.0.80.0060.00916.91
8.0.70.0040.00416.91
8.0.60.0050.00316.79
8.0.50.0040.00416.87
8.0.30.0060.01316.86
8.0.20.0080.01217.08
8.0.10.0070.00016.89
8.0.00.0090.00816.72
7.4.330.0030.00315.55
7.4.320.0000.00616.52
7.4.300.0060.00016.37
7.4.290.0030.00316.52
7.4.280.0000.00916.36
7.4.270.0030.00516.54
7.4.260.0070.00016.60
7.4.250.0040.00416.59
7.4.240.0000.00916.64
7.4.230.0040.00416.62
7.4.220.0040.00416.36
7.4.210.0090.00916.61
7.4.200.0000.00716.71
7.4.160.0090.01016.62
7.4.140.0120.00517.86
7.4.130.0060.01216.59
7.4.120.0100.00716.58
7.4.110.0100.00716.56
7.4.100.0110.00716.63
7.4.90.0130.00616.59
7.4.80.0060.01019.39
7.4.70.0140.01216.67
7.4.60.0170.00716.46
7.4.50.0150.00716.51
7.4.40.0240.01116.50
7.4.30.0180.01216.48
7.4.20.0180.01016.41
7.4.10.0180.00615.65
7.4.00.0080.01015.47
7.3.330.0030.00313.32
7.3.320.0000.00713.39
7.3.310.0030.00316.28
7.3.300.0030.00516.38
7.3.290.0020.00516.25
7.3.280.0080.00816.31
7.3.260.0110.00916.46
7.3.240.0090.00816.54
7.3.230.0060.01216.39
7.3.210.0180.00616.44
7.3.200.0070.01016.38
7.3.190.0110.01516.52
7.3.180.0140.01116.40
7.3.170.0110.00816.47
7.3.160.0240.00916.15
7.3.150.0250.00716.22
7.3.140.0220.01316.32
7.3.130.0120.01415.53
7.3.120.0120.01115.43
7.3.110.0130.01015.60
7.3.100.0110.00715.50
7.3.90.0110.01015.32
7.3.80.0120.01015.33
7.3.70.0170.00415.24
7.3.60.0130.00615.40
7.3.50.0110.00815.09
7.3.40.0070.01015.01
7.3.30.0130.00315.12
7.3.20.0110.00716.23
7.3.10.0160.00816.22
7.3.00.0120.00916.23
7.2.330.0100.00616.87
7.2.320.0120.00616.79
7.2.310.0110.01316.70
7.2.300.0220.01116.57
7.2.290.0210.00616.48
7.2.280.0260.00716.74
7.2.270.0270.01116.73
7.2.260.0150.01215.60
7.2.250.0070.01715.75
7.2.240.0110.00815.51
7.2.230.0100.01015.72
7.2.220.0080.01315.58
7.2.210.0150.00715.54
7.2.200.0090.01315.67
7.2.190.0130.01015.54
7.2.180.0100.00915.34
7.2.170.0100.00915.37
7.2.160.0090.01015.38
7.2.150.0120.00916.46
7.2.140.0310.00816.47
7.2.130.0150.00716.60
7.2.120.0120.00816.56
7.2.110.0150.00816.57
7.2.100.0120.00916.52
7.2.90.0130.00816.55
7.2.80.0120.00916.45
7.2.70.0120.01116.48
7.2.60.0120.00716.50
7.2.50.0120.00916.53
7.2.40.0130.00716.56
7.2.30.0110.00816.64
7.2.20.0110.01116.46
7.2.10.0110.01016.46
7.2.00.0140.00916.46
7.1.330.0120.00815.74
7.1.320.0140.00715.74
7.1.310.0090.01215.70
7.1.300.0080.01315.77
7.1.290.0120.00815.77
7.1.280.0110.00715.34
7.1.270.0100.00915.44
7.1.260.0120.00715.37
7.1.250.0130.00615.37
7.1.240.0210.00815.77
7.1.230.0210.01115.81
7.1.220.0160.00915.60
7.1.210.0080.01215.76
7.1.200.0130.01215.81
7.1.190.0150.00915.74
7.1.180.0120.01015.65
7.1.170.0150.00815.84
7.1.160.0160.00715.64
7.1.150.0180.00715.67
7.1.140.0200.01015.82
7.1.130.0150.01015.56
7.1.120.0140.00715.55
7.1.110.0210.00615.75
7.1.100.0110.01115.75
7.1.90.0120.01215.61
7.1.80.0190.00415.79
7.1.70.0150.01115.61
7.1.60.0130.00815.72
7.1.50.0110.01315.72
7.1.40.0170.00815.71
7.1.30.0200.00715.55
7.1.20.0200.00415.72
7.1.10.0170.00815.90
7.1.00.0280.00315.58

preferences:
92.93 ms | 403 KiB | 5 Q