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_arr); $a[] = array_shift($x_arr); } 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.0110.01418.18
8.3.50.0100.00717.95
8.3.40.0140.01020.04
8.3.30.0030.01719.63
8.3.20.0060.00322.85
8.3.10.0070.00323.48
8.3.00.0060.00323.48
8.2.180.0120.01218.16
8.2.170.0090.00922.96
8.2.160.0110.00621.51
8.2.150.0000.00924.18
8.2.140.0030.00724.66
8.2.130.0000.00919.34
8.2.120.0040.00426.35
8.2.110.0060.00622.20
8.2.100.0070.00719.16
8.2.90.0000.01018.88
8.2.80.0070.00418.63
8.2.70.0040.00719.05
8.2.60.0030.00919.16
8.2.50.0040.00718.63
8.2.40.0030.01120.64
8.2.30.0030.00620.49
8.2.20.0000.00919.84
8.2.10.0030.00620.41
8.2.00.0030.00620.59
8.1.280.0070.01025.92
8.1.270.0110.00020.63
8.1.260.0080.00326.35
8.1.250.0030.00628.09
8.1.240.0040.00824.67
8.1.230.0110.00419.26
8.1.220.0070.00319.41
8.1.210.0000.01218.86
8.1.200.0040.00819.11
8.1.190.0070.00421.84
8.1.180.0000.01119.05
8.1.170.0070.00320.27
8.1.160.0040.00720.26
8.1.150.0030.00920.28
8.1.140.0030.00725.51
8.1.130.0040.00821.65
8.1.120.0030.00618.94
8.1.110.0030.00718.94
8.1.100.0000.01018.86
8.1.90.0100.00018.88
8.1.80.0070.00318.90
8.1.70.0030.00718.98
8.1.60.0060.00619.00
8.1.50.0030.01218.95
8.1.40.0040.00819.06
8.1.30.0000.01119.10
8.1.20.0000.01019.08
8.1.10.0000.01019.08
8.1.00.0060.00618.91
8.0.300.0080.00819.52
8.0.290.0090.00318.13
8.0.280.0040.00719.83
8.0.270.0000.01018.63
8.0.260.0000.00919.83
8.0.250.0000.01418.34
8.0.240.0040.00718.36
8.0.230.0070.00318.16
8.0.220.0000.01118.25
8.0.210.0040.00718.22
8.0.200.0060.00318.32
8.0.190.0070.00318.34
8.0.180.0040.00718.26
8.0.170.0000.01218.28
8.0.160.0000.01018.13
8.0.150.0080.00318.32
8.0.140.0000.01118.30
8.0.130.0030.00614.73
8.0.120.0000.01018.29
8.0.110.0100.00018.21
8.0.100.0000.01018.28
8.0.90.0030.00718.10
8.0.80.0080.01118.27
8.0.70.0110.00018.11
8.0.60.0030.00718.11
8.0.50.0040.00718.08
8.0.30.0110.01318.47
8.0.20.0070.01718.68
8.0.10.0040.00718.25
8.0.00.0120.01418.02
7.4.330.0040.00417.01
7.4.320.0070.00317.85
7.4.300.0050.00517.85
7.4.290.0050.00517.82
7.4.280.0000.01017.88
7.4.270.0050.00517.83
7.4.260.0000.00917.86
7.4.250.0040.00717.81
7.4.240.0030.00717.82
7.4.230.0070.00317.84
7.4.220.0040.00718.03
7.4.210.0120.01317.97
7.4.200.0040.00717.58
7.4.160.0090.01517.85
7.4.140.0130.01217.89
7.4.130.0090.01517.95
7.4.120.0120.01217.95
7.4.110.0100.01317.94
7.4.100.0160.01017.91
7.4.90.0100.01317.85
7.4.80.0110.01219.39
7.4.70.0170.01417.98
7.4.60.0070.02317.73
7.4.50.0030.01717.75
7.4.40.0100.01617.95
7.4.00.0100.01016.46
7.3.330.0050.00314.67
7.3.320.0040.00414.77
7.3.310.0030.00717.56
7.3.300.0030.00617.65
7.3.290.0030.00617.68
7.3.280.0100.01217.67
7.3.260.0150.01117.80
7.3.240.0110.01117.88
7.3.230.0100.01317.71
7.3.210.0140.00717.88
7.3.200.0070.01617.76
7.3.190.0180.01517.75
7.3.180.0190.00317.50
7.3.170.0060.01617.77
7.3.160.0160.01317.86
7.3.10.0290.01518.25
7.3.00.2990.00916.62
7.2.330.0120.01217.97
7.2.320.0160.01717.81
7.2.310.0140.01017.99
7.2.300.0130.01018.17
7.2.290.0130.01017.99
7.2.130.2850.01016.53
7.2.120.2330.01216.85
7.2.110.2120.01516.83
7.2.100.1220.01016.77
7.2.90.1280.01617.07
7.2.80.1490.01716.66
7.2.70.1350.01317.06
7.2.60.1620.01216.93
7.2.50.2360.01316.79
7.2.40.1930.01517.02
7.2.30.2020.01517.08
7.2.20.1370.01017.12
7.2.10.2670.01216.73
7.2.00.3070.01016.75
7.1.250.2380.01615.90
7.0.330.3340.01814.60
5.6.380.0090.02317.78

preferences:
43.88 ms | 400 KiB | 5 Q