3v4l.org

run code in 300+ PHP versions simultaneously
<?php $objs = [ ['value'=>2, 'key'=>'a'], ['value'=>3, 'key'=>'b'] ]; print_r($objs); $keys = array_column($objs, 'key'); $index = array_search('a', $keys); if ($index !== false) { $objs[$index]['value'] = 5; } print_r($objs);

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.3.130.0090.00018.45
8.3.120.0060.00319.08
8.3.110.0030.00720.94
8.3.100.0090.00517.49
8.3.90.0120.00621.67
8.3.80.0090.00517.34
8.3.70.0150.00116.50
8.3.60.0150.00517.46
8.3.50.0100.00617.60
8.3.40.0100.00818.13
8.3.30.0120.00820.94
8.3.20.0090.00721.54
8.3.10.0060.00822.61
8.3.00.0110.00521.66
8.2.250.0080.00018.56
8.2.240.0150.00019.05
8.2.230.0040.00422.58
8.2.220.0080.00718.44
8.2.210.0090.00221.61
8.2.200.0100.00216.31
8.2.190.0100.00516.66
8.2.180.0070.00721.21
8.2.170.0100.00518.32
8.2.160.0110.00621.23
8.2.150.0090.00622.95
8.2.140.0070.00622.67
8.2.130.0070.00721.49
8.2.120.0100.00423.15
8.2.110.0090.00221.81
8.2.100.0090.00520.99
8.2.90.0090.00620.62
8.2.80.0130.00420.75
8.2.70.0110.00343.55
8.2.60.0120.00519.33
8.2.50.0110.00619.47
8.2.40.0120.00419.71
8.2.30.0100.00519.24
8.2.20.0100.00419.14
8.2.10.0080.00719.13
8.2.00.0100.00519.11
8.1.300.0090.00016.14
8.1.290.0040.00423.48
8.1.280.0070.00620.90
8.1.270.0040.00521.70
8.1.260.0070.00523.05
8.1.250.0050.00723.43
8.1.240.0090.00521.95
8.1.230.0080.00520.98
8.1.220.0110.00520.17
8.1.210.0120.00520.32
8.1.200.0110.00434.48
8.1.190.0100.00419.18
8.1.180.0120.00419.53
8.1.170.0090.00519.37
8.1.160.0100.00419.28
8.1.150.0100.00419.01
8.1.140.0100.00519.32
8.1.130.0100.00418.87
8.1.120.0100.00518.95
8.1.110.0090.00518.92
8.1.100.0100.00418.69
8.1.90.0090.00518.51
8.1.80.0090.00618.42
8.1.70.0090.00618.41
8.1.60.0110.00518.52
8.1.50.0110.00518.46
8.1.40.0110.00518.54
8.1.30.0100.00618.59
8.1.20.0110.00518.55
8.1.10.0110.00518.51
8.1.00.0100.00618.49
8.0.300.0110.00320.36
8.0.290.0120.00434.22
8.0.280.0110.00418.83
8.0.270.0100.00518.55
8.0.260.0120.00518.56
8.0.250.0090.00718.58
8.0.240.0140.00418.57
8.0.230.0120.00418.27
8.0.220.0110.00518.19
8.0.210.0120.00518.01
8.0.200.0120.00417.98
8.0.190.0130.00417.87
8.0.180.0110.00617.98
8.0.170.0120.00517.99
8.0.160.0130.00418.01
8.0.150.0130.00518.01
8.0.140.0110.00518.00
8.0.130.0130.00417.71
8.0.120.0110.00717.99
8.0.110.0130.00418.00
8.0.100.0130.00417.98
8.0.90.0140.00417.99
8.0.80.0120.00617.97
8.0.70.0110.00617.96
8.0.60.0120.00517.96
8.0.50.0110.00617.97
8.0.30.0120.00517.87
8.0.20.0130.00418.06
8.0.10.0130.00418.06
8.0.00.0110.00618.00
7.4.330.0110.00518.01
7.4.320.0130.00618.18
7.4.300.0120.00417.67
7.4.290.0130.00517.85
7.4.280.0140.00517.86
7.4.270.0130.00517.86
7.4.260.0120.00517.86
7.4.250.0130.00517.87
7.4.240.0150.00317.84
7.4.230.0130.00417.84
7.4.220.0120.00517.80
7.4.210.0130.00417.69
7.4.200.0120.00417.82
7.4.190.0110.00617.94
7.4.180.0130.00417.99
7.4.160.0120.00617.67
7.4.150.0140.00417.93
7.4.140.0120.00517.89
7.4.130.0100.00617.78
7.4.120.0130.00517.63
7.4.110.0130.00417.79
7.4.100.0120.00417.87
7.4.90.0110.00517.76
7.4.80.0100.00617.87
7.4.70.0130.00317.72
7.4.60.0120.00517.72
7.4.50.0110.00417.67
7.4.40.0120.00417.67
7.4.30.0120.00417.76
7.4.20.0120.00417.79
7.4.10.0110.00417.73
7.4.00.0130.00518.47
7.3.330.0140.00417.50
7.3.320.0140.00417.52
7.3.310.0120.00717.71
7.3.300.0130.00517.68
7.3.290.0140.00417.70
7.3.280.0140.00517.52
7.3.270.0160.00417.80
7.3.260.0160.00317.48
7.3.250.0140.00517.80
7.3.240.0140.00517.51
7.3.230.0150.00417.70
7.3.220.0150.00517.80
7.3.210.0130.00617.68
7.3.200.0140.00517.61
7.3.190.0150.00517.57
7.3.180.0150.00517.60
7.3.170.0140.00617.60
7.3.160.0130.00617.59
7.3.150.0140.00517.70
7.3.140.0150.00417.70
7.3.130.0140.00517.68
7.3.120.0140.00517.51
7.3.110.0140.00517.50
7.3.100.0120.00617.49
7.3.90.0130.00617.60
7.3.80.0140.00417.48
7.3.70.0110.00617.43
7.3.60.0140.00517.63
7.3.50.0150.00417.62
7.3.40.0120.00717.64
7.3.30.0130.00617.58
7.3.20.0180.00518.36
7.3.10.0160.00518.20
7.3.00.0170.00519.04
7.2.340.0140.00417.84
7.2.330.0120.00717.79
7.2.320.0140.00617.80
7.2.310.0120.00617.77
7.2.300.0120.00617.76
7.2.290.0140.00517.78
7.2.280.0140.00517.86
7.2.270.0130.00517.86
7.2.260.0140.00417.85
7.2.250.0130.00517.83
7.2.240.0120.00717.69
7.2.230.0120.00617.68
7.2.220.0140.00417.66
7.2.210.0130.00617.71
7.2.200.0140.00517.79
7.2.190.0140.00517.72
7.2.180.0130.00517.75
7.2.170.0140.00417.75
7.2.160.0130.00517.79
7.2.150.0130.00618.65
7.2.140.0130.00618.67
7.2.130.0130.00518.62
7.2.120.0140.00518.48
7.2.110.0130.00518.43
7.2.100.0120.00618.47
7.2.90.0140.00518.39
7.2.80.0150.00518.45
7.2.70.0130.00618.44
7.2.60.0140.00518.43
7.2.50.0130.00518.42
7.2.40.0130.00518.47
7.2.30.0140.00518.47
7.2.20.0130.00518.45
7.2.10.0130.00618.46
7.2.00.0130.00518.47
7.1.330.0130.00517.85
7.1.320.0160.00417.85
7.1.310.0140.00517.84
7.1.300.0110.00617.88
7.1.290.0170.00417.87
7.1.280.0110.00717.87
7.1.270.0130.00517.85
7.1.260.0140.00517.86
7.1.250.0140.00417.69
7.1.240.0140.00517.99
7.1.230.0130.00617.83
7.1.220.0140.00517.83
7.1.210.0140.00617.85
7.1.200.0150.00417.86
7.1.190.0170.00517.80
7.1.180.0130.00517.79
7.1.170.0140.00517.83
7.1.160.0130.00417.78
7.1.150.0120.00617.78
7.1.140.0140.00417.79
7.1.130.0140.00517.74
7.1.120.0130.00517.77
7.1.110.0140.00517.80
7.1.100.0160.00517.77
7.1.90.0140.00517.81
7.1.80.0150.00417.85
7.1.70.0150.00517.71
7.1.60.0150.00518.87
7.1.50.0140.00518.91
7.1.40.0140.00518.89
7.1.30.0160.00418.92
7.1.20.0130.00718.86
7.1.10.0150.00417.78
7.1.00.0130.00517.78
7.0.330.0150.00417.81
7.0.320.0130.00617.74
7.0.310.0150.00617.77
7.0.300.0130.00517.77
7.0.290.0130.00617.79
7.0.280.0130.00517.81
7.0.270.0140.00317.61
7.0.260.0130.00517.80
7.0.250.0160.00417.85
7.0.240.0150.00517.90
7.0.230.0140.00417.89
7.0.220.0150.00517.84
7.0.210.0140.00517.84
7.0.200.0130.00617.83
7.0.190.0180.00317.83
7.0.180.0150.00317.87
7.0.170.0140.00417.89
7.0.160.0140.00417.85
7.0.150.0140.00517.83
7.0.140.0130.00517.83
7.0.130.0170.00417.90
7.0.120.0130.00617.87
7.0.110.0140.00417.84
7.0.100.0140.00417.78
7.0.90.0150.00417.78
7.0.80.0120.00517.78
7.0.70.0130.00517.77
7.0.60.0140.00417.80
7.0.50.0140.00517.78
7.0.40.0140.00317.81
7.0.30.0150.00417.81
7.0.20.0130.00617.78
7.0.10.0140.00417.80
7.0.00.0160.00517.81
5.6.400.0110.00517.39
5.6.390.0120.00717.56
5.6.380.0100.00817.32
5.6.370.0120.00617.55
5.6.360.0110.00717.54
5.6.350.0110.00717.53
5.6.340.0120.00717.52
5.6.330.0120.00717.51
5.6.320.0140.00517.49
5.6.310.0100.01017.50
5.6.300.0120.00717.52
5.6.290.0110.00917.52
5.6.280.0120.00517.58
5.6.270.0110.00717.53
5.6.260.0110.00717.55
5.6.250.0120.00617.56
5.6.240.0120.00617.58
5.6.230.0120.00717.61
5.6.220.0130.00617.61
5.6.210.0130.00917.63
5.6.200.0140.00617.65
5.6.190.0130.00717.63
5.6.180.0130.00817.61
5.6.170.0130.01017.65
5.6.160.0110.00917.61
5.6.150.0130.00617.64
5.6.140.0140.00617.61
5.6.130.0130.00717.62
5.6.120.0130.00617.60
5.6.110.0150.00617.57
5.6.100.0120.00717.61
5.6.90.0130.00617.56
5.6.80.0120.00717.49
5.6.70.0110.00717.39
5.6.60.0130.00917.57
5.6.50.0130.00617.49
5.6.40.0120.00817.57
5.6.30.0140.00517.58
5.6.20.0120.00617.52
5.6.10.0120.00717.56
5.6.00.0110.00617.44

preferences:
34.49 ms | 403 KiB | 5 Q