3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(); $arr[1] = array('p' => 3, 'id' => 4); $arr[2] = array('p' => 2, 'id' => 3); $arr[3] = array('p' => 1, 'id' => 2); $arr[4] = array('p' => 0, 'id' => 1); $mas = array(); foreach($arr as $ind => $itm) { $mas[$itm['p']][$itm['id']] = 'aaa'.$ind; }

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.0140.00716.63
8.3.50.0110.01016.47
8.3.40.0090.00619.02
8.3.30.0120.00618.89
8.3.20.0040.00418.73
8.3.10.0090.00020.65
8.3.00.0040.00417.75
8.2.180.0140.00716.75
8.2.170.0110.00422.96
8.2.160.0100.00322.05
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0080.00019.95
8.2.110.0060.00321.14
8.2.100.0060.00617.91
8.2.90.0070.00319.21
8.2.80.0080.00017.93
8.2.70.0050.00317.75
8.2.60.0040.00417.80
8.2.50.0000.00818.07
8.2.40.0040.00418.22
8.2.30.0100.00018.00
8.2.20.0000.00717.82
8.2.10.0080.00017.71
8.2.00.0060.00317.68
8.1.280.0120.00325.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0040.00422.45
8.1.230.0060.00620.84
8.1.220.0060.00317.74
8.1.210.0050.00318.85
8.1.200.0090.00017.35
8.1.190.0050.00317.53
8.1.180.0060.00318.10
8.1.170.0040.00418.74
8.1.160.0070.00018.79
8.1.150.0050.00218.62
8.1.140.0030.00617.45
8.1.130.0000.00617.82
8.1.120.0000.00717.54
8.1.110.0000.00817.46
8.1.100.0040.00417.43
8.1.90.0040.00417.46
8.1.80.0000.00717.45
8.1.70.0030.00317.43
8.1.60.0090.00017.55
8.1.50.0080.00017.33
8.1.40.0000.00717.52
8.1.30.0080.00017.68
8.1.20.0060.00317.56
8.1.10.0040.00417.54
8.1.00.0020.00517.38
8.0.300.0030.00319.98
8.0.290.0070.00016.63
8.0.280.0000.00718.37
8.0.270.0070.00017.17
8.0.260.0030.00516.81
8.0.250.0000.00816.91
8.0.240.0080.00016.86
8.0.230.0000.00716.82
8.0.220.0030.00316.78
8.0.210.0000.00816.78
8.0.200.0030.00316.90
8.0.190.0030.00316.95
8.0.180.0040.00416.96
8.0.170.0030.00516.86
8.0.160.0030.00316.94
8.0.150.0000.00716.85
8.0.140.0000.00816.73
8.0.130.0030.00313.34
8.0.120.0000.00716.75
8.0.110.0040.00416.76
8.0.100.0000.00816.86
8.0.90.0040.00416.85
8.0.80.0110.00316.88
8.0.70.0070.00016.95
8.0.60.0040.00416.77
8.0.50.0000.00816.82
8.0.30.0130.00817.12
8.0.20.0070.01417.02
8.0.10.0070.00016.97
8.0.00.0140.00516.84
7.4.330.0020.00212.89
7.4.320.0000.00616.50
7.4.300.0060.00016.59
7.4.290.0040.00416.51
7.4.280.0040.00416.49
7.4.270.0030.00316.59
7.4.260.0020.00313.24
7.4.250.0040.00416.49
7.4.240.0000.00716.43
7.4.230.0040.00416.53
7.4.220.0090.01016.61
7.4.210.0080.00816.52
7.4.200.0050.00316.25
7.4.190.0000.00716.62
7.4.160.0030.01216.46
7.4.150.0140.01016.52
7.4.140.0140.00516.51
7.4.130.0130.01116.48
7.4.120.0080.01016.61
7.4.110.0140.00316.40
7.4.100.0030.01316.46
7.4.90.0150.00316.54
7.4.80.0140.01116.48
7.4.70.0120.00916.34
7.4.60.0080.01116.55
7.4.50.0000.00916.34
7.4.40.0040.01116.46
7.4.30.0030.01416.51
7.4.00.0030.01114.86
7.3.330.0060.00013.11
7.3.320.0000.00713.07
7.3.310.0000.00716.42
7.3.300.0000.00716.18
7.3.290.0070.00716.27
7.3.280.0100.00816.34
7.3.270.0100.01016.32
7.3.260.0120.00416.45
7.3.250.0130.00816.41
7.3.240.0070.01416.57
7.3.230.0070.01116.56
7.3.210.0070.01016.30
7.3.200.0130.00719.39
7.3.190.0040.01516.63
7.3.180.0040.01216.42
7.3.170.0100.01216.29
7.3.160.0030.01316.60
7.3.120.0090.00614.94
7.3.10.0030.00716.71
7.3.00.0110.00416.76
7.2.330.0060.01216.39
7.2.320.0100.00716.75
7.2.310.0080.02116.63
7.2.300.0030.01816.72
7.2.290.0080.00816.84
7.2.130.0080.00416.82
7.2.120.0060.00917.06
7.2.110.0030.00716.94
7.2.100.0070.00716.88
7.2.90.0100.00317.10
7.2.80.0030.00716.78
7.2.70.0030.00916.73
7.2.60.0130.00016.72
7.2.50.0060.00316.99
7.2.40.0070.00716.87
7.2.30.0000.01417.14
7.2.20.0030.00917.02
7.2.10.0050.00616.88
7.2.00.0040.01116.73
7.1.250.0100.00015.56
7.1.70.0000.01117.31
7.1.60.0030.01719.40
7.1.50.0150.00434.80
7.1.00.0000.07722.28
7.0.200.0240.00614.56
7.0.140.0100.06021.95
7.0.120.0100.05322.09
7.0.60.0030.04020.06
7.0.50.0070.08717.91
7.0.40.0070.04020.16
7.0.30.0330.07720.09
7.0.20.0270.07720.00
7.0.10.0100.04020.00
7.0.00.0070.08720.24
5.6.280.0000.07720.83
5.6.210.0100.08020.72
5.6.200.0000.05018.11
5.6.190.0070.07020.77
5.6.180.0230.05320.56
5.6.170.0200.08720.38
5.6.160.0130.08020.33
5.6.150.0030.08018.16
5.6.140.0000.08018.20
5.6.130.0070.05318.16
5.6.120.0170.04721.00
5.6.110.0070.08720.95
5.6.100.0070.08321.14
5.6.90.0070.05720.88
5.6.80.0070.07320.41
5.5.350.0230.07320.43
5.5.340.0030.08017.95
5.5.330.0100.06720.21
5.5.320.0100.04720.30
5.5.310.0300.04020.30
5.5.300.0070.08017.98
5.5.290.0070.07718.01
5.5.280.0030.05020.85
5.5.270.0130.07320.93
5.5.260.0230.06320.76
5.5.250.0070.04720.78
5.5.240.0070.08020.18
5.4.450.0070.03719.48
5.4.440.0030.04319.50
5.4.430.0000.04019.11
5.4.420.0130.03719.24
5.4.410.0130.02719.11
5.4.400.0100.03318.81
5.4.390.0000.04018.79
5.4.380.0100.03018.92
5.4.370.0070.05719.14
5.4.360.0000.04018.78
5.4.350.0100.06319.08
5.4.340.0030.04719.00
5.4.320.0230.03018.92
5.4.310.0000.06319.00
5.4.300.0070.04319.14
5.4.290.0100.07719.14
5.4.280.0070.07318.80
5.4.270.0100.05719.07
5.4.260.0000.04719.17
5.4.250.0130.03019.18
5.4.240.0070.08019.14
5.4.230.0170.07019.16
5.4.220.0270.03319.19
5.4.210.0100.05718.78
5.4.200.0100.07319.14
5.4.190.0170.06319.07
5.4.180.0000.05019.14
5.4.170.0070.03718.99
5.4.160.0030.08019.15
5.4.150.0070.08019.05
5.4.140.0070.05016.20
5.4.130.0100.05716.24
5.4.120.0070.07016.24
5.4.110.0070.04716.37
5.4.100.0100.04716.25
5.4.90.0070.07016.34
5.4.80.0030.04016.59
5.4.70.0070.05016.37
5.4.60.0000.04016.28
5.4.50.0070.03716.34
5.4.40.0030.06716.36
5.4.30.0030.04016.24
5.4.20.0070.03316.26
5.4.10.0130.05716.24
5.4.00.0070.05015.93
5.3.290.0030.06714.54
5.3.280.0030.08314.52
5.3.270.0130.04314.55
5.3.260.0030.08314.39
5.3.250.0070.05714.53
5.3.240.0070.08014.54
5.3.230.0030.04714.53
5.3.220.0200.06714.35
5.3.210.0000.05014.52
5.3.200.0030.04014.51
5.3.190.0100.06314.50
5.3.180.0030.06014.65
5.3.170.0030.07014.46
5.3.160.0070.08014.52
5.3.150.0100.06714.50
5.3.140.0030.08314.48
5.3.130.0070.07714.48
5.3.120.0070.04714.56
5.3.110.0070.07714.49
5.3.100.0170.06713.97
5.3.90.0100.04313.95
5.3.80.0170.06013.95
5.3.70.0100.03713.86
5.3.60.0130.06713.84
5.3.50.0070.03713.88
5.3.40.0070.07013.91
5.3.30.0070.03313.74
5.3.20.0100.07313.62
5.3.10.0030.07713.61
5.3.00.0130.06713.58
5.2.170.0030.06711.13
5.2.160.0070.02711.08
5.2.150.0030.06311.13
5.2.140.0030.03011.30
5.2.130.0000.06011.01
5.2.120.0100.05710.99
5.2.110.0130.06011.03
5.2.100.0070.05711.18
5.2.90.0030.04711.07
5.2.80.0100.05711.04
5.2.70.0000.06311.03
5.2.60.0070.05311.03
5.2.50.0030.04311.01
5.2.40.0030.06010.92
5.2.30.0130.05710.82
5.2.20.0030.05310.94
5.2.10.0070.05710.86
5.2.00.0070.06010.70
5.1.60.0000.05310.01
5.1.50.0070.0409.94
5.1.40.0030.04710.12
5.1.30.0000.04010.38
5.1.20.0030.03710.23
5.1.10.0000.04310.08
5.1.00.0030.06010.22
5.0.50.0000.0508.59
5.0.40.0030.0478.36
5.0.30.0000.0438.38
5.0.20.0070.0438.36
5.0.10.0070.0438.14
5.0.00.0000.0678.15
4.4.90.0070.0307.99
4.4.80.0030.0277.99
4.4.70.0030.0177.99
4.4.60.0100.0277.99
4.4.50.0030.0307.99
4.4.40.0070.0407.99
4.4.30.0030.0207.99
4.4.20.0030.0307.99
4.4.10.0000.0377.99
4.4.00.0070.0477.99
4.3.110.0000.0337.99
4.3.100.0000.0177.99
4.3.90.0000.0207.99
4.3.80.0000.0507.99
4.3.70.0100.0177.99
4.3.60.0000.0237.99
4.3.50.0000.0337.99
4.3.40.0000.0477.99
4.3.30.0000.0277.99
4.3.20.0000.0377.99
4.3.10.0000.0277.99
4.3.00.0030.0277.99

preferences:
36.56 ms | 401 KiB | 5 Q