3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [0 => 0, 1=> 0, 4 => 0, 6 => 0]; $full = array_fill(0,6,999); foreach($full as $k => &$v) if (isset($arr[$k])) $v = $arr[$k]; print_r($full); $new = $arr + array_fill(0,6,999); ksort($new); print_r($new);

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.5.10.0090.00819.21
8.5.00.0110.00419.92
8.4.150.0010.00214.05
8.4.140.0120.01117.59
8.4.130.0110.00818.55
8.4.120.0120.00824.17
8.4.110.0140.00618.86
8.4.100.0140.00717.40
8.4.90.0130.00720.63
8.4.80.0130.00820.68
8.4.70.0120.00719.05
8.4.60.0090.00822.32
8.4.50.0100.00918.43
8.4.40.0060.00617.54
8.4.30.0040.00420.42
8.4.20.0110.01117.73
8.4.10.0060.00319.55
8.3.280.0100.01018.44
8.3.270.0110.00816.47
8.3.260.0110.00816.67
8.3.250.0110.00918.88
8.3.240.0110.00816.58
8.3.230.0130.00716.55
8.3.220.0100.00918.93
8.3.210.0110.00416.49
8.3.200.0030.00516.80
8.3.190.0100.00817.29
8.3.180.0080.01018.89
8.3.170.0070.01117.19
8.3.160.0120.00616.61
8.3.150.0120.00617.29
8.3.140.0080.00017.23
8.3.130.0030.00518.23
8.3.120.0000.01918.93
8.3.110.0070.00320.94
8.3.100.0030.00616.38
8.3.90.0090.00616.27
8.3.80.0060.00318.43
8.3.70.0030.01216.63
8.3.60.0120.00918.31
8.3.50.0160.00523.48
8.3.40.0110.00718.71
8.3.30.0110.00418.69
8.3.20.0070.00020.77
8.3.10.0080.00023.66
8.3.00.0040.00719.66
8.2.290.0110.00817.11
8.2.280.0040.00420.19
8.2.270.0170.00316.48
8.2.260.0040.00418.98
8.2.250.0090.00616.96
8.2.240.0070.00717.18
8.2.230.0040.00422.58
8.2.220.0070.00324.06
8.2.210.0040.00426.77
8.2.200.0060.00318.54
8.2.190.0070.00718.29
8.2.180.0150.00018.18
8.2.170.0110.00722.96
8.2.160.0100.00321.02
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00826.16
8.2.110.0060.00320.33
8.2.100.0080.00417.91
8.2.90.0040.00418.34
8.2.80.0000.00719.21
8.2.70.0000.00917.63
8.2.60.0040.00417.75
8.2.50.0040.00418.05
8.2.40.0000.00818.28
8.2.30.0000.00719.48
8.2.20.0040.00418.02
8.2.10.0080.00019.29
8.2.00.0080.00019.18
8.1.330.0120.00716.04
8.1.320.0100.01016.00
8.1.310.0080.00018.61
8.1.300.0050.00317.86
8.1.290.0060.00318.88
8.1.280.0070.01425.92
8.1.270.0060.00320.52
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0090.00022.14
8.1.230.0140.00020.82
8.1.220.0050.00317.74
8.1.210.0060.00618.88
8.1.200.0080.00017.53
8.1.190.0030.00617.36
8.1.180.0100.00018.10
8.1.170.0080.00017.62
8.1.160.0040.00418.75
8.1.150.0000.00818.82
8.1.140.0000.00720.75
8.1.130.0030.00320.28
8.1.120.0030.00417.45
8.1.110.0030.00617.42
8.1.100.0000.00817.47
8.1.90.0030.00517.46
8.1.80.0080.00017.46
8.1.70.0040.00417.45
8.1.60.0050.00317.58
8.1.50.0050.00317.39
8.1.40.0030.00517.53
8.1.30.0040.00417.59
8.1.20.0070.00017.50
8.1.10.0030.00617.46
8.1.00.0040.00417.38
8.0.300.0070.00020.09
8.0.290.0030.00516.75
8.0.280.0030.00318.34
8.0.270.0030.00318.05
8.0.260.0000.00620.10
8.0.250.0000.00717.01
8.0.240.0040.00417.04
8.0.230.0000.00716.94
8.0.220.0000.00716.87
8.0.210.0040.00416.82
8.0.200.0000.00617.04
8.0.190.0040.00416.90
8.0.180.0050.00317.01
8.0.170.0000.00916.98
8.0.160.0000.00716.97
8.0.150.0080.00016.75
8.0.140.0000.00716.78
8.0.130.0050.00013.45
8.0.120.0000.00816.96
8.0.110.0000.00716.73
8.0.100.0000.00716.98
8.0.90.0000.00916.97
8.0.80.0100.00916.90
8.0.70.0000.00716.81
8.0.60.0050.00316.75
8.0.50.0080.00016.91
8.0.30.0120.00817.28
8.0.20.0150.00817.08
8.0.10.0000.00717.05
8.0.00.0060.01216.84
7.4.330.0020.00216.76
7.4.320.0030.00316.61
7.4.300.0000.00816.48
7.4.290.0030.00316.49
7.4.280.0060.00316.63
7.4.270.0060.00316.39
7.4.260.0030.00313.25
7.4.250.0070.00016.54
7.4.240.0020.00516.63
7.4.230.0000.00716.61
7.4.220.0030.00316.49
7.4.210.0100.00516.54
7.4.200.0030.00316.61
7.4.130.0110.00916.41
7.4.120.0060.01216.44
7.4.110.0060.01216.57
7.4.100.0110.00716.63
7.4.90.0120.00616.61
7.4.80.0070.01119.39
7.4.70.0170.00016.65
7.4.60.0040.01216.57
7.4.50.0040.01416.40
7.4.40.0080.00816.70
7.4.20.0070.01016.32
7.4.10.0120.01116.36
7.4.00.0100.01016.41
7.3.330.0030.00316.18
7.3.320.0030.00313.01
7.3.310.0070.00016.09
7.3.300.0030.00316.05
7.3.290.0100.00716.25
7.3.280.0110.00316.23
7.3.260.0120.00616.43
7.3.240.0120.00616.44
7.3.230.0170.00016.25
7.3.210.0090.00816.33
7.3.200.0080.00816.29
7.3.190.0030.01316.30
7.3.180.0140.00316.55
7.3.170.0160.00016.35
7.3.160.0060.00916.59
7.3.140.0090.01216.46
7.3.130.0140.00616.25
7.3.120.0120.01216.46
7.3.110.0090.01216.42
7.3.100.0070.01116.44
7.3.90.0120.00616.41
7.3.80.0030.01516.27
7.3.70.0100.00916.26
7.3.60.0120.00616.27
7.3.50.0150.00916.27
7.3.40.0170.00316.21
7.3.30.0040.01916.47
7.3.20.0110.00716.45
7.3.10.0120.00616.52
7.3.00.0140.00516.32
7.2.330.0030.01316.57
7.2.320.0040.01216.81
7.2.310.0180.00416.78
7.2.300.0140.00316.65
7.2.290.0060.00916.77
7.2.270.0030.01916.71
7.2.260.0120.00816.62
7.2.250.0080.01316.79
7.2.240.0120.01216.49
7.2.230.0090.00916.76
7.2.220.0130.01016.28
7.2.210.0090.00816.36
7.2.200.0200.00016.58
7.2.190.0130.01016.43
7.2.180.0110.01116.66
7.2.170.0100.00916.75
7.2.160.0130.01016.44
7.2.150.0120.00616.59
7.2.140.0040.01616.61
7.2.130.0050.01616.79
7.2.120.0060.01316.56
7.2.110.0080.01616.55
7.2.100.0090.00916.67
7.2.90.0100.01416.43
7.2.80.0120.00816.48
7.2.70.0110.00716.48
7.2.60.0120.00616.65
7.2.50.0150.00616.52
7.2.40.0030.01616.70
7.2.30.0730.00716.72
7.2.20.0080.01216.60
7.2.10.0180.00616.56
7.2.00.0110.01116.59

preferences:
52.64 ms | 403 KiB | 5 Q