3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( 'background1.png - abc1.png','background1.png - abc2.png', 'background1.png - abc3.png','background2.png - abc4.png', 'background2.png - abc5.png','background2.png - abc6.png'); foreach ($arr as $elem) { $temp = explode('-', $elem); $key = trim($temp[0]); $fruits[$key][] = trim($temp[1]); } echo '<pre>';print_r($fruits);echo '</pre>';

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.60.0180.00316.62
8.3.50.0160.00222.00
8.3.40.0060.00918.75
8.3.30.0110.00418.99
8.3.20.0050.00320.51
8.3.10.0020.00521.80
8.3.00.0080.00019.21
8.2.180.0040.01818.48
8.2.170.0180.00422.96
8.2.160.0070.01020.47
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0080.00019.79
8.2.110.0070.00319.17
8.2.100.0080.00417.63
8.2.90.0000.00819.14
8.2.80.0030.00617.97
8.2.70.0040.00417.63
8.2.60.0020.00517.93
8.2.50.0060.00318.07
8.2.40.0030.00619.93
8.2.30.0020.00518.17
8.2.20.0050.00317.65
8.2.10.0040.00418.11
8.2.00.0040.00417.67
8.1.280.0140.00325.92
8.1.270.0040.00420.69
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0090.00024.03
8.1.230.0110.00017.48
8.1.220.0050.00317.74
8.1.210.0070.00318.77
8.1.200.0030.00617.35
8.1.190.0060.00317.22
8.1.180.0000.00818.10
8.1.170.0040.00420.50
8.1.160.0050.00221.92
8.1.150.0040.00418.80
8.1.140.0040.00417.44
8.1.130.0030.00317.88
8.1.120.0030.00717.46
8.1.110.0030.00317.42
8.1.100.0030.00517.48
8.1.90.0040.00417.46
8.1.80.0000.00717.45
8.1.70.0040.00417.33
8.1.60.0050.00317.52
8.1.50.0000.00817.42
8.1.40.0060.00317.55
8.1.30.0000.00817.63
8.1.20.0040.00417.58
8.1.10.0090.00017.46
8.1.00.0090.00017.55
8.0.300.0080.00018.77
8.0.290.0070.00016.75
8.0.280.0030.00418.40
8.0.270.0030.00317.26
8.0.260.0030.00317.30
8.0.250.0070.00017.00
8.0.240.0030.00316.88
8.0.230.0030.00316.99
8.0.220.0000.00816.93
8.0.210.0030.00316.78
8.0.200.0070.00016.80
8.0.190.0040.00416.97
8.0.180.0040.00416.88
8.0.170.0040.00416.92
8.0.160.0040.00416.87
8.0.150.0020.00516.88
8.0.140.0040.00416.83
8.0.130.0000.00613.27
8.0.120.0090.00016.83
8.0.110.0050.00316.75
8.0.100.0030.00616.93
8.0.90.0040.00416.91
8.0.80.0030.01316.95
8.0.70.0070.00016.89
8.0.60.0000.00716.73
8.0.50.0040.00416.76
8.0.30.0100.01417.05
8.0.20.0150.00417.40
8.0.10.0040.00416.87
8.0.00.0100.00816.81
7.4.330.0030.00315.03
7.4.320.0000.00616.60
7.4.300.0060.00016.36
7.4.290.0040.00416.64
7.4.280.0000.00816.52
7.4.270.0030.00316.57
7.4.260.0040.00316.45
7.4.250.0070.00016.43
7.4.240.0040.00416.55
7.4.230.0030.00316.43
7.4.220.0060.01316.65
7.4.210.0090.00716.57
7.4.200.0040.00416.48
7.4.160.0120.00316.68
7.4.150.0150.00917.40
7.4.140.0150.00817.86
7.4.130.0090.00816.44
7.4.120.0110.00816.43
7.4.110.0100.00716.55
7.4.100.0060.01916.41
7.4.90.0100.00616.61
7.4.80.0060.01119.39
7.4.70.0030.01416.58
7.4.60.0100.00716.55
7.4.50.0030.00516.35
7.4.40.0070.01016.48
7.4.30.0030.01316.61
7.4.00.0030.01414.61
7.3.330.0060.00013.07
7.3.320.0090.00413.26
7.3.310.0070.00016.38
7.3.300.0060.00016.34
7.3.290.0030.00316.23
7.3.280.0090.00716.30
7.3.270.0090.00917.40
7.3.260.0110.00616.73
7.3.250.0120.00916.30
7.3.240.0100.00616.51
7.3.230.0030.01516.46
7.3.210.0110.00616.52
7.3.200.0060.01019.39
7.3.190.0090.00616.61
7.3.180.0090.00616.36
7.3.170.0070.01016.34
7.3.160.0130.00316.30
7.2.330.0120.00916.78
7.2.320.0080.00816.63
7.2.310.0070.01116.62
7.2.300.0120.00316.82
7.2.290.0060.01216.84
7.2.60.0040.00816.87
7.2.00.0000.01319.38
7.1.200.0060.00615.78
7.1.100.0040.00717.99
7.1.70.0090.00317.04
7.1.60.0040.02219.50
7.1.50.0130.01017.01
7.1.00.0130.07022.31
7.0.200.0000.00716.74
7.0.140.0130.06322.15
7.0.60.0030.07019.95
7.0.50.0030.05317.95
7.0.40.0070.04720.30
7.0.30.0370.07020.21
7.0.20.0370.04020.09
7.0.10.0370.07320.10
7.0.00.0070.08320.07
5.6.280.0030.07321.02
5.6.210.0030.08320.49
5.6.200.0070.07718.17
5.6.190.0030.06020.39
5.6.180.0200.05320.75
5.6.170.0330.07320.71
5.6.160.0070.08320.39
5.6.150.0030.04318.22
5.6.140.0030.06718.13
5.6.130.0130.06318.26
5.6.120.0070.07020.97
5.6.110.0100.06721.01
5.6.100.0000.09720.98
5.6.90.0070.06721.12
5.6.80.0130.07020.39
5.6.70.0100.04720.36
5.5.350.0100.08320.35
5.5.340.0070.05317.96
5.5.330.0100.08720.42
5.5.320.0070.05020.27
5.5.310.0330.07720.27
5.5.300.0130.07317.97
5.5.290.0130.06717.98
5.5.280.0030.04320.87
5.5.270.0170.07320.95
5.5.260.0130.06020.86
5.5.250.0100.07320.79
5.5.240.0070.04320.04
5.4.450.0670.05319.46
5.4.440.0700.07319.45
5.4.430.0900.05319.44
5.4.420.0800.06019.59
5.4.410.1030.08019.03
5.4.400.0230.07018.84
5.4.390.0200.05718.81
5.4.380.0230.05718.46
5.4.370.0230.05018.42
5.4.360.0170.05018.54
5.4.350.0070.07018.82
5.4.340.0330.03718.70
5.4.320.0230.05318.69
5.4.310.0170.05318.44
5.4.300.0230.05018.45
5.4.290.0170.05018.80
5.4.280.0200.04718.71
5.4.270.0230.05318.71
5.4.260.0200.05018.69
5.4.250.0170.05718.46
5.4.240.0130.06018.60
5.4.230.0130.05718.75
5.4.220.0230.05018.68
5.4.210.0230.04318.57
5.4.200.0100.05316.67
5.4.190.0300.04018.43
5.4.180.0230.06018.70
5.4.170.0170.05718.70
5.4.160.0230.04718.78
5.4.150.0070.06318.68
5.4.140.0200.04716.33
5.4.130.0170.06016.42
5.4.120.0330.03716.24
5.4.110.0200.06716.43
5.4.100.0200.07016.28
5.4.90.0130.05716.20
5.4.80.0170.04716.21
5.4.70.0130.05316.27
5.4.60.0230.04316.37
5.4.50.0130.05316.23
5.4.40.0200.07016.40
5.4.30.0130.05316.24
5.4.20.0300.04716.27
5.4.10.0170.05016.19
5.4.00.0070.06015.89
5.3.290.0300.06714.71
5.3.280.0270.05314.57
5.3.270.0200.05314.61
5.3.260.0270.05014.62
5.3.250.0300.06314.75
5.3.240.0200.07314.71
5.3.230.0300.06314.70
5.3.220.0230.05314.55
5.3.210.0170.05714.69
5.3.200.0230.04314.57
5.3.190.0230.05714.70
5.3.180.0230.06014.61
5.3.170.0230.04714.69
5.3.160.0170.05014.78
5.3.150.0230.05314.61
5.3.140.0200.05014.53
5.3.130.0200.05314.70
5.3.120.0230.05314.60
5.3.110.0170.05314.64
5.3.100.0100.05714.04
5.3.90.0130.05314.02
5.3.80.0200.04714.03
5.3.70.0030.06314.05
5.3.60.0300.04314.19
5.3.50.0170.05014.07
5.3.40.0270.04714.00
5.3.30.0200.05313.94
5.3.20.0170.05013.71
5.3.10.0170.07013.75
5.3.00.0200.07013.64
5.2.170.0170.06011.35
5.2.160.0130.04711.20
5.2.150.0170.05711.19
5.2.140.0100.05311.23
5.2.130.0070.04711.21
5.2.120.0130.04011.20
5.2.110.0230.03011.20
5.2.100.0270.03011.14
5.2.90.0170.04011.29
5.2.80.0200.03311.13
5.2.70.0030.05011.11
5.2.60.0170.04011.14
5.2.50.0130.04311.22
5.2.40.0200.03711.00
5.2.30.0130.04710.98
5.2.20.0200.03711.13
5.2.10.0070.04310.87
5.2.00.0200.03310.80
5.1.60.0070.03710.05
5.1.50.0130.03010.13
5.1.40.0230.02310.07
5.1.30.0130.04010.37
5.1.20.0070.04710.36
5.1.10.0030.05010.05
5.1.00.0100.04010.04
5.0.50.0070.0338.57
5.0.40.0100.0378.51
5.0.30.0100.0538.29
5.0.20.0130.0308.38
5.0.10.0100.0378.23
5.0.00.0000.0608.29
4.4.90.0070.0305.95
4.4.80.0000.0305.89
4.4.70.0030.0275.90
4.4.60.0130.0175.85
4.4.50.0070.0205.86
4.4.40.0000.0405.88
4.4.30.0130.0175.89
4.4.20.0030.0235.92
4.4.10.0100.0175.96
4.4.00.0030.0405.91
4.3.110.0030.0235.79
4.3.100.0100.0175.82
4.3.90.0070.0205.82
4.3.80.0000.0405.77
4.3.70.0070.0205.81
4.3.60.0100.0175.79
4.3.50.0100.0235.82
4.3.40.0030.0375.76
4.3.30.0070.0234.62
4.3.20.0170.0174.54
4.3.10.0030.0334.53
4.3.00.0130.0207.27

preferences:
43.1 ms | 401 KiB | 5 Q