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.140.0090.00616.56
8.3.130.0220.00517.57
8.3.120.0180.00817.68
8.3.110.0190.00718.83
8.3.100.0170.00817.15
8.3.90.0200.00619.94
8.3.80.0190.00716.95
8.3.70.0300.00316.39
8.3.60.0210.00717.15
8.3.50.0180.00417.37
8.3.40.0200.00817.82
8.3.30.0150.00720.34
8.3.20.0140.00620.69
8.3.10.0080.00621.57
8.3.00.0130.00520.84
8.2.250.0160.00617.57
8.2.240.0210.00417.76
8.2.230.0180.00419.57
8.2.220.0090.00718.05
8.2.210.0110.00419.83
8.2.200.0140.00116.27
8.2.190.0180.00516.50
8.2.180.0110.01019.58
8.2.170.0140.00818.03
8.2.160.0170.00720.32
8.2.150.0140.00621.89
8.2.140.0140.00621.61
8.2.130.0120.00820.65
8.2.120.0140.00521.98
8.2.110.0140.00320.95
8.2.100.0140.00520.28
8.2.90.0120.00620.12
8.2.80.0140.00620.19
8.2.70.0130.00341.18
8.2.60.0140.00619.09
8.2.50.0140.00619.24
8.2.40.0140.00419.45
8.2.30.0120.00519.09
8.2.20.0130.00419.01
8.2.10.0100.00718.99
8.2.00.0120.00518.96
8.1.300.0230.00216.16
8.1.290.0120.00421.05
8.1.280.0140.00719.34
8.1.270.0090.00620.78
8.1.260.0110.00521.95
8.1.250.0120.00722.15
8.1.240.0120.00621.01
8.1.230.0120.00620.22
8.1.220.0130.00619.63
8.1.210.0150.00619.83
8.1.200.0140.00432.55
8.1.190.0120.00518.92
8.1.180.0140.00519.24
8.1.170.0110.00519.11
8.1.160.0120.00419.08
8.1.150.0110.00518.86
8.1.140.0110.00519.14
8.1.130.0110.00518.74
8.1.120.0120.00518.79
8.1.110.0100.00518.77
8.1.100.0090.00418.60
8.1.90.0100.00518.42
8.1.80.0090.00618.35
8.1.70.0100.00718.33
8.1.60.0120.00518.44
8.1.50.0120.00518.37
8.1.40.0120.00518.45
8.1.30.0110.00618.51
8.1.20.0120.00518.48
8.1.10.0120.00518.44
8.1.00.0110.00618.41
8.0.300.0140.00319.72
8.0.290.0140.00532.25
8.0.280.0120.00418.62
8.0.270.0120.00518.37
8.0.260.0130.00518.38
8.0.250.0110.00718.39
8.0.240.0150.00418.40
8.0.230.0130.00418.14
8.0.220.0120.00618.08
8.0.210.0130.00517.93
8.0.200.0120.00517.90
8.0.190.0140.00417.79
8.0.180.0110.00717.88
8.0.170.0130.00517.91
8.0.160.0140.00517.93
8.0.150.0140.00517.92
8.0.140.0130.00617.90
8.0.130.0150.00417.63
8.0.120.0130.00617.89
8.0.110.0140.00417.90
8.0.100.0140.00517.89
8.0.90.0150.00417.90
8.0.80.0120.00617.87
8.0.70.0110.00617.87
8.0.60.0120.00517.88
8.0.50.0110.00617.88
8.0.30.0120.00517.79
8.0.20.0140.00417.97
8.0.10.0130.00417.98
8.0.00.0120.00517.94
7.4.330.0110.00517.88
7.4.320.0130.00618.05
7.4.300.0120.00417.60
7.4.290.0130.00517.76
7.4.280.0140.00517.76
7.4.270.0130.00517.77
7.4.260.0120.00517.76
7.4.250.0130.00517.77
7.4.240.0150.00317.75
7.4.230.0140.00417.74
7.4.220.0130.00517.71
7.4.210.0130.00417.61
7.4.200.0130.00417.74
7.4.190.0120.00517.83
7.4.180.0140.00417.89
7.4.160.0120.00617.59
7.4.150.0140.00417.82
7.4.140.0120.00517.81
7.4.130.0120.00617.69
7.4.120.0140.00517.56
7.4.110.0140.00417.70
7.4.100.0130.00517.78
7.4.90.0130.00517.67
7.4.80.0110.00617.78
7.4.70.0140.00417.63
7.4.60.0120.00517.63
7.4.50.0120.00417.58
7.4.40.0130.00417.59
7.4.30.0130.00417.67
7.4.20.0130.00417.70
7.4.10.0120.00417.64
7.4.00.0130.00518.36
7.3.330.0150.00417.42
7.3.320.0150.00417.44
7.3.310.0130.00617.62
7.3.300.0130.00517.59
7.3.290.0140.00517.61
7.3.280.0150.00517.45
7.3.270.0170.00417.70
7.3.260.0160.00417.41
7.3.250.0160.00517.69
7.3.240.0150.00517.44
7.3.230.0160.00417.61
7.3.220.0150.00517.70
7.3.210.0140.00617.59
7.3.200.0140.00617.53
7.3.190.0160.00517.50
7.3.180.0150.00517.52
7.3.170.0140.00617.52
7.3.160.0140.00617.51
7.3.150.0150.00417.61
7.3.140.0160.00517.61
7.3.130.0150.00517.59
7.3.120.0140.00517.43
7.3.110.0150.00517.43
7.3.100.0120.00617.42
7.3.90.0130.00617.52
7.3.80.0140.00417.41
7.3.70.0120.00617.37
7.3.60.0140.00617.55
7.3.50.0160.00417.54
7.3.40.0130.00717.55
7.3.30.0140.00617.50
7.3.20.0180.00518.33
7.3.10.0170.00518.18
7.3.00.0170.00518.99
7.2.340.0150.00417.74
7.2.330.0130.00717.70
7.2.320.0140.00617.71
7.2.310.0130.00617.67
7.2.300.0120.00617.67
7.2.290.0140.00517.68
7.2.280.0140.00517.76
7.2.270.0140.00517.75
7.2.260.0160.00417.75
7.2.250.0140.00517.73
7.2.240.0130.00717.60
7.2.230.0130.00617.60
7.2.220.0150.00517.57
7.2.210.0140.00617.62
7.2.200.0150.00617.70
7.2.190.0140.00617.63
7.2.180.0140.00517.66
7.2.170.0140.00517.66
7.2.160.0140.00417.69
7.2.150.0130.00718.61
7.2.140.0140.00618.62
7.2.130.0140.00518.59
7.2.120.0150.00518.45
7.2.110.0140.00518.42
7.2.100.0130.00618.46
7.2.90.0150.00518.37
7.2.80.0160.00518.43
7.2.70.0140.00718.42
7.2.60.0140.00518.40
7.2.50.0140.00518.40
7.2.40.0140.00518.45
7.2.30.0150.00518.46
7.2.20.0140.00518.44
7.2.10.0140.00718.43
7.2.00.0130.00518.46
7.1.330.0140.00517.79
7.1.320.0160.00517.81
7.1.310.0140.00517.79
7.1.300.0120.00617.85
7.1.290.0170.00417.82
7.1.280.0120.00617.80
7.1.270.0140.00517.80
7.1.260.0150.00417.83
7.1.250.0150.00517.67
7.1.240.0150.00417.91
7.1.230.0140.00617.79
7.1.220.0150.00517.78
7.1.210.0150.00517.81
7.1.200.0160.00417.82
7.1.190.0170.00517.77
7.1.180.0140.00517.73
7.1.170.0150.00617.78
7.1.160.0140.00417.73
7.1.150.0140.00517.73
7.1.140.0140.00417.75
7.1.130.0150.00517.70
7.1.120.0130.00617.74
7.1.110.0150.00517.74
7.1.100.0170.00517.72
7.1.90.0140.00517.77
7.1.80.0150.00417.80
7.1.70.0160.00517.66
7.1.60.0150.00518.75
7.1.50.0150.00518.80
7.1.40.0150.00518.79
7.1.30.0170.00318.82
7.1.20.0140.00718.77
7.1.10.0150.00417.75
7.1.00.0140.00517.72
7.0.330.0160.00417.73
7.0.320.0140.00517.67
7.0.310.0150.00617.70
7.0.300.0140.00517.71
7.0.290.0140.00617.74
7.0.280.0140.00517.74
7.0.270.0150.00317.57
7.0.260.0140.00517.72
7.0.250.0160.00517.80
7.0.240.0150.00517.84
7.0.230.0150.00417.83
7.0.220.0160.00517.77
7.0.210.0140.00617.77
7.0.200.0140.00617.78
7.0.190.0190.00317.78
7.0.180.0160.00417.80
7.0.170.0150.00417.83
7.0.160.0150.00417.77
7.0.150.0150.00517.77
7.0.140.0130.00617.78
7.0.130.0170.00517.83
7.0.120.0140.00517.80
7.0.110.0140.00517.76
7.0.100.0140.00417.71
7.0.90.0150.00417.71
7.0.80.0130.00617.71
7.0.70.0130.00617.69
7.0.60.0150.00417.73
7.0.50.0130.00517.71
7.0.40.0140.00317.75
7.0.30.0160.00417.74
7.0.20.0130.00517.70
7.0.10.0150.00417.73
7.0.00.0160.00517.73
5.6.400.0110.00517.34
5.6.390.0120.00717.48
5.6.380.0100.00817.26
5.6.370.0130.00617.47
5.6.360.0110.00717.46
5.6.350.0120.00717.45
5.6.340.0120.00717.44
5.6.330.0130.00717.43
5.6.320.0140.00417.41
5.6.310.0110.00917.42
5.6.300.0120.00617.44
5.6.290.0110.00817.45
5.6.280.0130.00517.49
5.6.270.0110.00717.45
5.6.260.0110.00717.47
5.6.250.0120.00617.48
5.6.240.0120.00617.50
5.6.230.0120.00717.52
5.6.220.0130.00617.52
5.6.210.0130.00917.55
5.6.200.0140.00517.56
5.6.190.0130.00617.54
5.6.180.0130.00817.52
5.6.170.0130.00917.56
5.6.160.0110.00817.53
5.6.150.0130.00617.55
5.6.140.0140.00617.52
5.6.130.0130.00717.54
5.6.120.0140.00617.52
5.6.110.0140.00617.49
5.6.100.0120.00617.53
5.6.90.0130.00617.48
5.6.80.0110.00717.41
5.6.70.0110.00717.33
5.6.60.0120.00917.48
5.6.50.0130.00517.41
5.6.40.0120.00817.49
5.6.30.0140.00517.50
5.6.20.0120.00617.44
5.6.10.0120.00617.48
5.6.00.0110.00617.37

preferences:
29.89 ms | 403 KiB | 5 Q