3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(5 => 1, 12 => 2); $arr[] = 56; // This is the same as $arr[13] = 56; // at this point of the script $arr["x"] = 42; // This adds a new element to // the array with key "x" var_dump($arr);

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.0100.00616.50
8.3.50.0130.00717.32
8.3.40.0150.00318.84
8.3.30.0140.00018.70
8.3.20.0000.00818.77
8.3.10.0050.00318.77
8.3.00.0030.00619.50
8.2.180.0110.00316.37
8.2.170.0040.01222.96
8.2.160.0100.00719.00
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0000.00720.63
8.2.110.0000.00920.47
8.2.100.0130.00017.81
8.2.90.0040.00417.75
8.2.80.0040.00418.61
8.2.70.0030.00617.46
8.2.60.0090.00017.63
8.2.50.0000.00817.93
8.2.40.0090.00019.89
8.2.30.0000.01117.77
8.2.20.0080.00017.61
8.2.10.0000.00717.68
8.2.00.0000.00717.55
8.1.280.0000.02325.92
8.1.270.0050.00323.99
8.1.260.0030.00526.35
8.1.250.0080.00028.09
8.1.240.0060.00618.98
8.1.230.0000.01120.99
8.1.220.0000.00818.57
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0070.00417.22
8.1.180.0000.00818.10
8.1.170.0080.00017.62
8.1.160.0070.00019.00
8.1.150.0070.00418.63
8.1.140.0050.00217.33
8.1.130.0030.00317.73
8.1.120.0000.00717.41
8.1.110.0000.00717.37
8.1.100.0030.00417.32
8.1.90.0030.00317.29
8.1.80.0000.00717.41
8.1.70.0070.00017.29
8.1.60.0030.00917.49
8.1.50.0030.00617.41
8.1.40.0060.00317.45
8.1.30.0040.00417.61
8.1.20.0000.00817.62
8.1.10.0000.00817.41
8.1.00.0000.00717.48
8.0.300.0040.00418.77
8.0.290.0040.00416.58
8.0.280.0000.00718.44
8.0.270.0020.00517.16
8.0.260.0000.00816.71
8.0.250.0040.00416.84
8.0.240.0000.00716.90
8.0.230.0030.00316.80
8.0.220.0070.00016.86
8.0.210.0070.00016.70
8.0.200.0070.00016.89
8.0.190.0000.00716.77
8.0.180.0040.00416.90
8.0.170.0040.00416.63
8.0.160.0040.00416.74
8.0.150.0000.00916.77
8.0.140.0070.00016.72
8.0.130.0000.00613.28
8.0.120.0040.00416.78
8.0.110.0040.00416.88
8.0.100.0040.00416.68
8.0.90.0030.00316.77
8.0.80.0040.01816.71
8.0.70.0050.00316.63
8.0.60.0070.00016.86
8.0.50.0080.00016.65
8.0.30.0120.00816.97
8.0.20.0080.01017.09
8.0.10.0040.00416.98
8.0.00.0080.00916.80
7.4.330.0050.00012.96
7.4.320.0030.00316.39
7.4.300.0000.00616.54
7.4.290.0070.00016.51
7.4.280.0000.00816.58
7.4.270.0000.00716.38
7.4.260.0060.00013.20
7.4.250.0000.00816.29
7.4.240.0040.00416.39
7.4.230.0000.00716.38
7.4.220.0070.01116.58
7.4.210.0070.00716.48
7.4.200.0030.00316.63
7.4.190.0040.00416.63
7.4.160.0130.00316.23
7.4.150.0150.00316.54
7.4.140.0140.00416.33
7.4.130.0030.01316.36
7.4.120.0050.01116.53
7.4.110.0120.00616.49
7.4.100.0110.00716.46
7.4.90.0110.00716.48
7.4.80.0060.01219.39
7.4.70.0070.01016.50
7.4.60.0100.00716.50
7.4.50.0060.00616.16
7.4.40.0120.00316.45
7.4.30.0120.00416.43
7.4.00.0030.01414.63
7.3.330.0000.00713.21
7.3.320.0030.00413.16
7.3.310.0040.00416.15
7.3.300.0000.00716.17
7.3.290.0080.00716.29
7.3.280.0090.00916.28
7.3.270.0040.01316.37
7.3.260.0110.00816.51
7.3.250.0140.00716.35
7.3.240.0110.00616.28
7.3.230.0060.01516.35
7.3.210.0060.01116.40
7.3.200.0060.00916.27
7.3.190.0140.00616.34
7.3.180.0120.00316.41
7.3.170.0060.00916.44
7.3.160.0060.01016.45
7.3.120.0040.00414.83
7.2.330.0090.00916.29
7.2.320.0070.01016.50
7.2.310.0140.00416.45
7.2.300.0130.00616.57
7.2.290.0120.00916.50
7.2.00.0060.00919.30
7.1.100.0030.00917.88
7.1.70.0080.00317.28
7.1.60.0100.01019.30
7.1.50.0070.01016.80
7.1.00.0030.04722.31
7.0.200.0160.00516.78
7.0.140.0030.07322.09
7.0.120.0070.07722.17
7.0.60.0070.05321.73
7.0.50.0130.05317.81
7.0.40.0130.05320.19
7.0.30.0300.07020.18
7.0.20.0200.06020.13
7.0.10.0130.08320.20
7.0.00.0000.09020.32
5.6.280.0000.07721.03
5.6.210.0070.07320.52
5.6.200.0070.07718.19
5.6.190.0000.05320.41
5.6.180.0230.03720.45
5.6.170.0270.05720.49
5.6.160.0000.04320.33
5.6.150.0100.06318.20
5.6.140.0100.04018.11
5.6.130.0070.05718.18
5.6.120.0070.03721.04
5.6.110.0070.09021.08
5.6.100.0100.04021.10
5.6.90.0100.08021.02
5.6.80.0170.07320.52
5.5.350.0100.08020.32
5.5.340.0100.05017.91
5.5.330.0030.06720.25
5.5.320.0100.04720.30
5.5.310.0100.04720.18
5.5.300.0100.07317.91
5.5.290.0030.04017.99
5.5.280.0100.07020.73
5.5.270.0130.07720.86
5.5.260.0100.08020.83
5.5.250.0000.04320.57
5.5.240.0230.05320.22
5.4.450.0100.07319.44
5.4.440.0000.07019.41
5.4.430.0070.08019.11
5.4.420.0100.07719.13
5.4.410.0170.07019.27
5.4.400.0100.07319.09
5.4.390.0000.07719.16
5.4.380.0000.05319.05
5.4.370.0030.05019.02
5.4.360.0000.07019.14
5.4.350.0100.05318.91
5.4.340.0000.04318.79
5.4.320.0070.04019.22
5.4.310.0000.05319.18
5.4.300.0000.04719.17
5.4.290.0070.04319.08
5.4.280.0030.04018.91
5.4.270.0070.07319.18
5.4.260.0030.08019.07
5.4.250.0030.04719.15
5.4.240.0130.03319.00
5.4.230.0100.03019.07
5.4.220.0030.04719.07
5.4.210.0070.07719.00
5.4.200.0000.08018.78
5.4.190.0070.08019.11
5.4.180.0170.03319.17
5.4.170.0100.04319.13
5.4.160.0030.03719.12
5.4.150.0000.05018.76
5.4.140.0070.07316.48
5.4.130.0070.06016.36
5.4.120.0100.04316.28
5.4.110.0130.04016.32
5.4.100.0030.04016.41
5.4.90.0070.06016.60
5.4.80.0000.04316.36
5.4.70.0030.06716.35
5.4.60.0030.03716.32
5.4.50.0030.04316.35
5.4.40.0070.06016.30
5.4.30.0030.06016.27
5.4.20.0030.04016.21
5.4.10.0030.06716.33
5.4.00.0070.05315.82
5.3.290.0170.05014.45
5.3.280.0070.04314.68
5.3.270.0000.04714.42
5.3.260.0070.05014.41
5.3.250.0030.03714.57
5.3.240.0100.06314.54
5.3.230.0130.06714.54
5.3.220.0030.08314.38
5.3.210.0070.05714.52
5.3.200.0000.04714.50
5.3.190.0070.07014.44
5.3.180.0100.04314.35
5.3.170.0070.05314.46
5.3.160.0070.07314.34
5.3.150.0170.05714.48
5.3.140.0100.07014.52
5.3.130.0130.06714.50
5.3.120.0000.05714.47
5.3.110.0030.03714.63
5.3.100.0170.04313.91
5.3.90.0100.03013.80
5.3.80.0070.03713.98
5.3.70.0100.06713.96
5.3.60.0070.03313.86
5.3.50.0030.03313.78
5.3.40.0070.03713.87
5.3.30.0070.03713.83
5.3.20.0000.04013.52
5.3.10.0030.03313.61
5.3.00.0000.03713.47
5.2.170.0000.03011.09
5.2.160.0000.03011.11
5.2.150.0030.03011.03
5.2.140.0000.03011.22
5.2.130.0030.02711.09
5.2.120.0100.02011.18
5.2.110.0030.02710.98
5.2.100.0030.02710.92
5.2.90.0030.02710.99
5.2.80.0030.03010.98
5.2.70.0000.03711.24
5.2.60.0030.02711.03
5.2.50.0030.02710.95
5.2.40.0070.02310.92
5.2.30.0000.03010.86
5.2.20.0000.03010.94
5.2.10.0000.03010.85
5.2.00.0000.03010.56
5.1.60.0070.0239.97
5.1.50.0030.0239.89
5.1.40.0100.0209.94
5.1.30.0030.03010.31
5.1.20.0000.02710.24
5.1.10.0030.02310.12
5.1.00.0000.02710.05
5.0.50.0000.0208.60
5.0.40.0030.0378.46
5.0.30.0030.0308.13
5.0.20.0000.0208.16
5.0.10.0000.0208.16
5.0.00.0000.0308.30
4.4.90.0000.0177.69
4.4.80.0000.0137.69
4.4.70.0030.0137.69
4.4.60.0000.0237.69
4.4.50.0070.0107.69
4.4.40.0000.0237.69
4.4.30.0000.0177.69
4.4.20.0000.0177.69
4.4.10.0070.0137.69
4.4.00.0070.0207.69
4.3.110.0030.0137.69
4.3.100.0000.0137.69
4.3.90.0000.0137.69
4.3.80.0000.0237.69
4.3.70.0000.0177.69
4.3.60.0070.0107.69
4.3.50.0000.0137.69
4.3.40.0000.0237.69
4.3.30.0000.0177.69
4.3.20.0000.0137.69
4.3.10.0030.0137.69
4.3.00.0000.0137.69

preferences:
54.83 ms | 401 KiB | 5 Q