3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ar = []; $ar[0]['name'] = 'Ted'; $ar[1]['name'] = 'Red'; $ar[2]['name'] = 'Ted'; $res_ar = []; $ar_names = []; foreach($ar as $ind => $row){ if (in_array($row['name'],$ar_names)){ array_splice($ar,$ind,1); } else { $ar_names[] = $row['name']; $res_ar[] = $row; } } print_r($res_ar);

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.140.0160.00617.40
8.4.130.0040.00918.70
8.4.120.0130.00720.84
8.4.110.0110.01022.38
8.4.100.0100.01017.73
8.4.90.0100.00820.52
8.4.80.0060.00617.73
8.4.70.0110.00717.73
8.4.60.0110.00918.99
8.4.50.0110.00920.24
8.4.40.0130.00719.32
8.4.30.0170.00320.21
8.4.20.0100.00320.54
8.4.10.0090.00619.36
8.3.270.0100.01016.72
8.3.260.0070.01116.75
8.3.250.0110.00819.03
8.3.240.0100.00916.43
8.3.230.0110.00916.77
8.3.220.0070.00117.18
8.3.210.0140.00518.44
8.3.200.0050.00416.69
8.3.190.0110.00817.32
8.3.180.0140.00518.16
8.3.170.0110.00617.41
8.3.160.0090.00918.46
8.3.150.0110.00718.63
8.3.140.0080.00016.85
8.3.130.0000.00816.49
8.3.120.0040.00420.79
8.3.110.0000.00820.94
8.3.100.0060.00318.70
8.3.90.0070.00016.50
8.3.80.0050.00518.43
8.3.70.0120.00916.63
8.3.60.0090.00618.43
8.3.50.0070.00518.55
8.3.40.0110.00718.69
8.3.30.0100.00718.69
8.3.20.0060.00320.91
8.3.10.0080.00021.94
8.3.00.0000.00720.61
8.2.290.0100.00820.39
8.2.280.0100.00618.69
8.2.270.0100.01017.22
8.2.260.0150.00416.72
8.2.250.0080.00016.50
8.2.240.0070.00417.18
8.2.230.0030.00622.58
8.2.220.0000.00924.06
8.2.210.0060.00326.77
8.2.200.0090.00018.42
8.2.190.0140.00716.58
8.2.180.0040.01118.54
8.2.170.0140.00422.96
8.2.160.0130.00020.43
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0110.00419.76
8.2.110.0000.00922.11
8.2.100.0080.00417.84
8.2.90.0060.00317.70
8.2.80.0000.00919.28
8.2.70.0040.00418.05
8.2.60.0070.00018.16
8.2.50.0040.00418.10
8.2.40.0040.00420.46
8.2.30.0070.00019.28
8.2.20.0000.00718.18
8.2.10.0040.00418.77
8.2.00.0030.00619.41
8.1.330.0130.00521.88
8.1.320.0080.01116.16
8.1.310.0080.00018.34
8.1.300.0030.00516.21
8.1.290.0000.00918.88
8.1.280.0070.00725.92
8.1.270.0040.00420.70
8.1.260.0030.00526.35
8.1.250.0050.00228.09
8.1.240.0060.00320.83
8.1.230.0080.00320.95
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0030.00617.48
8.1.190.0040.00417.25
8.1.180.0000.00818.10
8.1.170.0040.00418.64
8.1.160.0070.00020.28
8.1.150.0030.00518.82
8.1.140.0030.00518.89
8.1.130.0030.00317.40
8.1.120.0030.00317.48
8.1.110.0040.00417.50
8.1.100.0040.00417.48
8.1.90.0000.00717.50
8.1.80.0040.00417.34
8.1.70.0040.00417.42
8.1.60.0080.00017.50
8.1.50.0040.00417.45
8.1.40.0080.00017.47
8.1.30.0040.00417.66
8.1.20.0050.00317.68
8.1.10.0070.00017.59
8.1.00.0060.00317.54
8.0.300.0000.00720.14
8.0.290.0050.00216.74
8.0.280.0030.00318.45
8.0.270.0000.00816.84
8.0.260.0000.00616.75
8.0.250.0030.00316.99
8.0.240.0040.00416.98
8.0.230.0030.00316.93
8.0.220.0040.00416.84
8.0.210.0040.00416.89
8.0.200.0060.00016.98
8.0.190.0040.00416.99
8.0.180.0030.00516.86
8.0.170.0060.00316.96
8.0.160.0070.00016.85
8.0.150.0030.00316.88
8.0.140.0050.00316.87
8.0.130.0030.00313.36
8.0.120.0060.00316.76
8.0.110.0000.00816.94
8.0.100.0030.00317.00
8.0.90.0080.00016.88
8.0.80.0090.00616.88
8.0.70.0040.00416.93
8.0.60.0000.00716.84
8.0.50.0040.00416.95
8.0.30.0030.01417.14
8.0.20.0090.01017.09
8.0.10.0050.00317.09
8.0.00.0130.01316.75
7.4.330.0030.00315.55
7.4.320.0070.00016.57
7.4.300.0060.00016.53
7.4.290.0000.00716.52
7.4.280.0040.00416.51
7.4.270.0050.00316.39
7.4.260.0000.00613.32
7.4.250.0000.00816.48
7.4.240.0000.00816.49
7.4.230.0000.00716.42
7.4.220.0020.00516.55
7.4.210.0110.00516.60
7.4.200.0000.00716.54
7.4.130.0090.00916.40
7.4.120.0130.01316.52
7.4.110.0050.01416.45
7.4.100.0000.01716.50
7.4.90.0100.01016.52
7.4.80.0100.00619.39
7.4.70.0100.00716.66
7.4.60.0080.00816.54
7.4.50.0110.00716.57
7.4.40.0120.00616.50
7.4.00.0070.00715.20
7.3.330.0040.00416.20
7.3.320.0030.00313.09
7.3.310.0030.00316.40
7.3.300.0000.00716.37
7.3.290.0040.00416.34
7.3.260.0110.00716.51
7.3.230.0160.00716.35
7.3.210.0130.00316.43
7.3.200.0130.00316.71
7.3.190.0090.00916.48
7.3.180.0130.00416.24
7.3.170.0110.00816.44
7.3.160.0120.00316.59
7.3.110.0170.00614.78
7.3.100.0150.00814.51
7.3.90.0060.01514.71
7.3.80.0060.00914.79
7.3.70.0060.01014.63
7.3.60.0100.00614.82
7.3.50.0030.01214.65
7.3.40.0040.01114.72
7.3.30.0030.01314.73
7.3.20.0110.00614.79
7.3.10.0140.00314.89
7.3.00.0120.00914.82
7.2.330.0180.00016.60
7.2.320.0100.00716.66
7.2.310.0180.00716.38
7.2.300.0110.00516.71
7.2.290.0100.00716.64
7.2.240.0060.01315.04
7.2.230.0060.01315.12
7.2.220.0180.00415.07
7.2.210.0090.01415.01
7.2.200.0160.00314.85
7.2.190.0030.01414.88
7.2.180.0090.00614.81
7.2.170.0080.00815.02
7.2.160.0100.00614.72
7.2.150.0150.00615.21
7.2.140.0140.00314.94
7.2.130.0180.00015.13
7.2.120.0110.01114.88
7.2.110.0130.00615.03
7.2.100.0120.00915.04
7.2.90.0090.01215.14
7.2.80.0140.00715.05
7.2.70.0660.01015.08
7.2.60.0090.00915.27
7.2.50.0100.01315.12
7.2.40.0140.01014.95
7.2.30.0130.01015.08
7.2.20.0050.01415.04
7.2.10.0040.01314.93
7.2.00.0030.01815.20
7.1.330.0060.01513.75
7.1.320.0040.01113.79
7.1.310.0190.00314.13
7.1.300.0120.00613.71
7.1.290.0090.00613.83
7.1.280.0040.01113.79
7.1.270.0070.00813.54
7.1.260.0050.01113.96
7.1.250.0030.01313.91

preferences:
152.47 ms | 403 KiB | 5 Q