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.0090.00918.56
8.3.50.0120.01217.99
8.3.40.0150.00919.79
8.3.30.0120.00619.71
8.3.20.0070.00322.89
8.3.10.0100.00023.39
8.3.00.0000.00923.66
8.2.180.0070.01818.16
8.2.170.0090.01222.96
8.2.160.0170.00021.65
8.2.150.0030.00724.18
8.2.140.0040.00724.66
8.2.130.0090.00019.95
8.2.120.0040.00426.35
8.2.110.0060.00622.25
8.2.100.0090.00619.08
8.2.90.0070.00319.00
8.2.80.0050.00518.63
8.2.70.0030.00719.16
8.2.60.0030.00719.25
8.2.50.0000.01018.50
8.2.40.0090.00920.52
8.2.30.0000.01020.44
8.2.20.0030.00719.78
8.2.10.0000.01020.33
8.2.00.0040.00720.52
8.1.280.0070.01025.92
8.1.270.0040.00720.34
8.1.260.0100.00026.35
8.1.250.0070.00328.09
8.1.240.0060.00624.75
8.1.230.0110.00419.45
8.1.220.0040.00719.41
8.1.210.0040.00718.88
8.1.200.0120.00018.86
8.1.190.0030.01319.04
8.1.180.0030.00719.28
8.1.170.0070.00420.18
8.1.160.0030.00720.27
8.1.150.0070.00320.34
8.1.140.0000.01025.48
8.1.130.0000.01021.63
8.1.120.0080.00319.01
8.1.110.0030.00719.04
8.1.100.0060.00618.88
8.1.90.0060.00318.96
8.1.80.0000.01218.88
8.1.70.0070.00418.86
8.1.60.0060.00619.16
8.1.50.0040.01119.03
8.1.40.0030.00818.97
8.1.30.0040.00819.00
8.1.20.0000.01019.16
8.1.10.0030.00719.10
8.1.00.0030.00819.07
8.0.300.0030.00722.02
8.0.290.0000.01218.25
8.0.280.0100.00019.84
8.0.270.0060.00318.64
8.0.260.0000.00919.76
8.0.250.0030.01018.40
8.0.240.0030.00618.15
8.0.230.0030.00618.32
8.0.220.0000.01118.12
8.0.210.0060.00318.17
8.0.200.0030.00818.27
8.0.190.0030.00718.26
8.0.180.0040.00718.23
8.0.170.0060.00618.22
8.0.160.0070.00318.18
8.0.150.0030.00918.21
8.0.140.0080.00318.25
8.0.130.0000.00914.77
8.0.120.0060.00618.23
8.0.110.0030.00718.22
8.0.100.0000.01018.29
8.0.90.0050.00518.09
8.0.80.0060.01518.23
8.0.70.0040.00718.15
8.0.60.0030.00718.29
8.0.50.0070.00318.17
8.0.30.0120.01018.55
8.0.20.0090.01518.70
8.0.10.0070.00318.21
8.0.00.0110.01318.11
7.4.330.0000.00716.91
7.4.320.0030.00717.82
7.4.300.0070.00417.93
7.4.290.0000.01017.95
7.4.280.0000.01117.86
7.4.270.0030.00617.78
7.4.260.0000.01017.84
7.4.250.0000.01017.81
7.4.240.0100.00317.83
7.4.230.0070.00317.95
7.4.220.0070.00317.93
7.4.210.0080.01517.90
7.4.200.0030.00617.81
7.4.160.0130.01217.93
7.4.140.0110.01217.88
7.4.130.0140.01117.86
7.4.120.0100.01617.96
7.4.110.0060.01617.95
7.4.100.0030.02717.87
7.4.90.0000.02417.98
7.4.80.0070.02019.39
7.4.70.0110.01817.89
7.4.60.0150.01117.99
7.4.50.0150.00617.85
7.4.40.0130.01617.92
7.4.00.0130.01016.21
7.3.330.0000.00914.54
7.3.320.0030.00614.71
7.3.310.0100.00017.80
7.3.300.0030.00717.64
7.3.290.0030.00617.61
7.3.280.0130.01317.70
7.3.260.0120.01217.81
7.3.240.0120.01117.84
7.3.230.0090.01217.84
7.3.210.0130.01017.75
7.3.200.0100.01917.97
7.3.190.0160.00617.76
7.3.180.0090.01217.93
7.3.170.0210.01017.77
7.3.160.0130.01017.77
7.3.120.0150.00916.24
7.3.110.0070.01516.34
7.3.100.0070.01415.99
7.3.90.0090.01116.31
7.3.80.0050.01816.04
7.3.70.0080.01016.13
7.3.60.0080.01116.25
7.3.50.0100.00716.31
7.3.40.0100.01116.21
7.3.30.0030.01216.35
7.3.20.0080.01118.38
7.3.10.0040.01618.66
7.3.00.0400.01117.57
7.2.330.0220.00317.99
7.2.320.0130.01317.91
7.2.310.0090.01317.87
7.2.300.0160.00618.14
7.2.290.0150.00918.11
7.2.250.0050.02216.40
7.2.240.0060.02016.34
7.2.230.0130.00916.50
7.2.220.0130.01216.51
7.2.210.0050.01716.28
7.2.200.0100.01416.51
7.2.190.0050.01516.21
7.2.180.0090.01116.36
7.2.170.0070.01516.40
7.2.160.0070.01116.32
7.2.150.0000.02118.89
7.2.140.0060.01318.49
7.2.130.0630.00717.27
7.2.120.0770.01317.37
7.2.110.0530.01217.35
7.2.100.0950.01917.42
7.2.90.0750.01417.34
7.2.80.0640.01217.38
7.2.70.0880.01417.49
7.2.60.0690.01117.67
7.2.50.0730.01417.52
7.2.40.0680.01317.62
7.2.30.0780.01517.47
7.2.20.0660.01517.48
7.2.10.0890.01717.54
7.2.00.0660.01317.39
7.1.330.0030.01617.76
7.1.320.0050.01617.82
7.1.310.0030.02017.82
7.1.300.0050.01417.85
7.1.290.0050.01317.66
7.1.280.0050.01517.77
7.1.270.0050.01617.60
7.1.260.0050.01317.77
7.1.250.0600.01016.28
7.0.330.1090.01314.62
5.6.380.0130.01617.59

preferences:
84.05 ms | 400 KiB | 5 Q