3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [0, 1, 2, 3]; unset($array[3], $array[2]); $arrayCopy = $array; $arrayCopy[] = 2; assert($arrayCopy === [0, 1, 2]); // this assertion must pass; it doesn't currently $array[] = 2; assert($array === $arrayCopy); // still identical/equal

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.00718.33
8.3.50.0130.00418.27
8.3.40.0130.00318.76
8.3.30.0070.00719.02
8.3.20.0040.00421.85
8.3.10.0000.00821.76
8.3.00.0000.00723.51
8.2.180.0090.00616.48
8.2.170.0110.00422.96
8.2.160.0080.00521.22
8.2.150.0000.00924.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0070.00026.16
8.2.110.0040.00719.34
8.2.100.0040.00817.91
8.2.90.0040.00418.25
8.2.80.0030.00617.97
8.2.70.0040.00417.91
8.2.60.0030.00618.13
8.2.50.0000.00818.10
8.2.40.0000.00720.59
8.2.30.0000.00819.13
8.2.20.0040.00418.04
8.2.10.0080.00019.23
8.2.00.0030.00319.24
8.1.280.0120.00325.92
8.1.270.0000.00823.97
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00322.52
8.1.230.0080.00322.81
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0000.00917.35
8.1.190.0040.00417.25
8.1.180.0040.00418.10
8.1.170.0030.00518.50
8.1.160.0040.00418.82
8.1.150.0040.00418.70
8.1.140.0020.00518.82
8.1.130.0000.00820.07
8.1.120.0060.00317.45
8.1.110.0070.00317.42
8.1.100.0040.00417.28
8.1.90.0030.00717.42
8.1.80.0080.00017.29
8.1.70.0030.00317.39
8.1.60.0000.00817.62
8.1.50.0000.00717.50
8.1.40.0040.00417.48
8.1.30.0040.00417.70
8.1.20.0100.00017.64
8.1.10.0000.00717.48
8.1.00.0040.00417.47
8.0.300.0030.00520.04
8.0.290.0040.00416.63
8.0.280.0000.00718.29
8.0.270.0000.00717.19
8.0.260.0070.00018.32
8.0.250.0000.00716.97
8.0.240.0000.00616.97
8.0.230.0000.00816.95
8.0.220.0040.00416.89
8.0.210.0000.00716.87
8.0.200.0040.00416.80
8.0.190.0030.00316.78
8.0.180.0040.00416.79
8.0.170.0000.00916.81
8.0.160.0000.00716.80
8.0.150.0040.00416.80
8.0.140.0050.00216.73
8.0.130.0030.00313.31
8.0.120.0040.00416.85
8.0.110.0050.00516.83
8.0.100.0080.00016.86
8.0.90.0040.00416.84
8.0.80.0110.00416.91
8.0.70.0000.00816.75
8.0.60.0040.00416.96
8.0.50.0040.00416.95
8.0.30.0080.00917.09
8.0.20.0130.00617.07
8.0.10.0000.00817.04
8.0.00.0100.01016.60
7.4.330.0050.00015.55
7.4.320.0030.00316.55
7.4.300.0060.00016.50
7.4.290.0050.00316.48
7.4.280.0020.00516.59
7.4.270.0030.00316.55
7.4.260.0030.00316.58
7.4.250.0080.00016.48
7.4.240.0050.00216.51
7.4.230.0030.00316.39
7.4.220.0050.00316.62
7.4.210.0080.00616.63
7.4.200.0040.00416.39
7.4.160.0110.00616.60
7.4.140.0150.01517.86
7.4.130.0070.01016.55
7.4.120.0060.01316.45
7.4.110.0040.01416.49
7.4.100.0030.01816.48
7.4.90.0110.00616.38
7.4.80.0120.00419.39
7.4.70.0100.00616.61
7.4.60.0100.00616.41
7.4.50.0100.00616.41
7.4.40.0110.00516.55
7.4.00.0070.00714.94
7.3.330.0000.00513.24
7.3.320.0030.00313.27
7.3.310.0050.00316.51
7.3.300.0000.00716.39
7.3.290.0080.01016.42
7.3.280.0170.00316.37
7.3.260.0130.00616.45
7.3.240.0090.00716.45
7.3.230.0150.00416.54
7.3.210.0140.00316.45
7.3.200.0080.00816.40
7.3.190.0130.00316.43
7.3.180.0100.00716.38
7.3.170.0090.00616.43
7.3.160.0060.01016.48
7.3.120.0060.00914.97
7.3.110.0040.00414.66
7.3.100.0030.01314.73
7.3.90.0040.01214.80
7.3.80.0000.01214.89
7.3.70.0040.00414.88
7.3.60.0070.00714.79
7.3.50.0070.00714.97
7.3.40.0100.00514.58
7.3.30.0020.01214.77
7.3.20.0050.00915.77
7.3.10.0090.00515.76
7.3.00.0130.00315.77
7.2.330.0170.00016.37
7.2.320.0090.00916.63
7.2.310.0090.00616.36
7.2.300.0100.00716.57
7.2.290.0040.01316.55
7.2.240.0030.01314.80
7.2.230.0090.00914.66
7.2.220.0090.00315.16
7.2.210.0070.01114.91
7.2.200.0040.00815.05
7.2.190.0110.00314.84
7.2.180.0080.00714.87
7.2.170.0050.01414.98
7.2.160.0030.01014.92
7.2.150.0110.00715.88
7.2.140.0060.00915.82
7.2.130.0130.00515.82
7.2.120.0210.00515.97
7.2.110.0110.00415.89
7.2.100.0090.00915.90
7.2.90.0060.01115.95
7.2.80.0070.00916.02
7.2.70.0090.01015.84
7.2.60.0080.00716.06
7.2.50.0090.00715.90
7.2.40.0100.00515.96
7.2.30.0120.00215.96
7.2.20.0120.01015.75
7.2.10.0120.00415.96
7.2.00.0090.00715.90
7.1.330.0070.00315.42
7.1.320.0090.00915.97
7.1.310.0060.00615.98
7.1.300.0080.00814.64
7.1.290.0060.00714.77
7.1.280.0020.01114.79
7.1.270.0090.00614.88
7.1.260.0120.00914.84
7.1.250.0040.01014.93

preferences:
62.39 ms | 401 KiB | 5 Q