3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = []; $x = 63; for ($x = 0; $x < 10000; $x++) { $a[] = substr($x, 0, 1); $a[] = substr($x, 1, 1); // $x_arr = str_split($x); $a[] = array_shift($x); $a[] = array_shift($x); } echo count($a);

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.0090.00618.39
8.3.50.0090.00518.20
8.3.40.0070.01018.99
8.3.30.0160.00018.70
8.3.20.0050.00321.85
8.3.10.0050.00323.65
8.3.00.0040.00423.71
8.2.180.0110.01116.50
8.2.170.0070.00722.96
8.2.160.0100.00320.38
8.2.150.0000.00824.18
8.2.140.0030.00524.66
8.2.130.0090.00018.09
8.2.120.0040.00426.35
8.2.110.0030.00722.26
8.2.100.0000.01118.03
8.2.90.0050.00317.75
8.2.80.0050.00317.97
8.2.70.0030.00517.91
8.2.60.0040.00418.22
8.2.50.0040.00418.10
8.2.40.0000.01119.30
8.2.30.0040.00419.25
8.2.20.0000.00719.80
8.2.10.0000.00719.31
8.2.00.0050.00319.46
8.1.280.0120.00325.92
8.1.270.0000.00918.92
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00622.54
8.1.230.0080.00417.83
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0080.00020.19
8.1.180.0030.00618.10
8.1.170.0000.00818.58
8.1.160.0000.00718.83
8.1.150.0050.00218.79
8.1.140.0040.00423.93
8.1.130.0040.00420.03
8.1.120.0000.00717.27
8.1.110.0040.00417.33
8.1.100.0050.00217.31
8.1.90.0040.00417.34
8.1.80.0030.00517.40
8.1.70.0000.00717.38
8.1.60.0000.00817.49
8.1.50.0050.00517.48
8.1.40.0000.00817.48
8.1.30.0030.00617.59
8.1.20.0070.00017.57
8.1.10.0040.00417.62
8.1.00.0030.00617.50
8.0.300.0000.00918.77
8.0.290.0040.00416.75
8.0.280.0000.00818.26
8.0.270.0040.00417.07
8.0.260.0030.00318.37
8.0.250.0090.00016.82
8.0.240.0030.00316.83
8.0.230.0050.00216.95
8.0.220.0070.00016.78
8.0.210.0040.00416.94
8.0.200.0030.00316.97
8.0.190.0090.00016.86
8.0.180.0050.00316.85
8.0.170.0030.00616.90
8.0.160.0030.00316.93
8.0.150.0040.00416.83
8.0.140.0030.00516.75
8.0.130.0050.00313.34
8.0.120.0030.00516.85
8.0.110.0080.00016.92
8.0.100.0040.00416.75
8.0.90.0030.00316.95
8.0.80.0070.01016.96
8.0.70.0000.00816.96
8.0.60.0040.00416.96
8.0.50.0000.00716.91
8.0.30.0140.00517.01
8.0.20.0150.00616.97
8.0.10.0040.00416.99
8.0.00.0060.01216.83
7.4.330.0090.00015.55
7.4.320.0000.01516.61
7.4.300.0170.00016.61
7.4.290.0050.00516.41
7.4.280.0080.00416.36
7.4.270.0120.00416.52
7.4.260.0060.00616.45
7.4.250.0030.00616.46
7.4.240.0000.01016.55
7.4.230.0070.00316.59
7.4.220.0050.00516.45
7.4.210.0420.02316.55
7.4.200.0070.00216.64
7.4.160.0370.01816.53
7.4.140.0290.01417.86
7.4.130.0300.01016.53
7.4.120.0300.01716.74
7.4.110.0670.02416.55
7.4.100.1060.02416.45
7.4.90.0610.00816.58
7.4.80.0420.02419.39
7.4.70.0380.01716.41
7.4.60.0790.02016.37
7.4.50.0440.01616.36
7.4.40.0210.01216.45
7.4.00.0040.01414.71
7.3.330.0000.01513.20
7.3.320.0130.00013.35
7.3.310.0000.01416.23
7.3.300.0080.00816.10
7.3.290.0030.00616.28
7.3.280.0110.01816.25
7.3.260.0420.01216.37
7.3.240.0230.00616.44
7.3.230.0430.01016.29
7.3.210.0140.01416.30
7.3.200.0350.01216.51
7.3.190.0300.02016.35
7.3.180.0230.01616.32
7.3.170.0240.03116.34
7.3.160.0340.01716.40
7.3.00.3610.00714.43
7.2.330.0690.02416.71
7.2.320.1080.04516.54
7.2.310.0220.01416.63
7.2.300.0140.01416.71
7.2.290.0410.03016.68
7.2.130.0840.01014.58
7.2.120.0820.00714.37
7.2.110.1650.00714.48
7.2.100.0140.00314.65
7.2.90.0040.01114.72
7.2.80.0150.01014.48
7.2.70.0150.00614.80
7.2.60.0140.00914.57
7.2.50.0150.00914.26
7.2.40.5070.01014.30
7.2.30.4670.01314.43
7.2.20.1310.01314.71
7.2.10.0210.00414.26
7.2.00.0170.00614.58
7.1.250.0830.00713.69
7.0.330.2740.00313.61
5.6.380.0100.00714.63

preferences:
33.13 ms | 400 KiB | 5 Q