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[] = $x_arr[0]; // $a[] = $x_arr[1]; } 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.0030.01318.55
8.3.50.0000.01518.14
8.3.40.0130.00918.91
8.3.30.0060.01018.92
8.3.20.0060.00321.99
8.3.10.0030.00523.66
8.3.00.0040.00423.48
8.2.180.0100.01016.61
8.2.170.0130.00722.96
8.2.160.0060.00920.89
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0060.00318.28
8.2.120.0080.00026.35
8.2.110.0130.00722.13
8.2.100.0040.00818.09
8.2.90.0080.00318.00
8.2.80.0070.00417.97
8.2.70.0000.00918.30
8.2.60.0090.00018.34
8.2.50.0030.00718.10
8.2.40.0080.00819.52
8.2.30.0000.00819.73
8.2.20.0040.00419.96
8.2.10.0040.00419.57
8.2.00.0030.00719.84
8.1.280.0140.01025.92
8.1.270.0060.00319.63
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00322.55
8.1.230.0090.00318.46
8.1.220.0000.00918.05
8.1.210.0000.00918.77
8.1.200.0070.00417.98
8.1.190.0080.00319.17
8.1.180.0050.00518.10
8.1.170.0000.01119.13
8.1.160.0040.00419.56
8.1.150.0090.00019.40
8.1.140.0030.00622.77
8.1.130.0060.00320.71
8.1.120.0060.00318.15
8.1.110.0000.00818.12
8.1.100.0030.00717.97
8.1.90.0040.00417.97
8.1.80.0030.00618.09
8.1.70.0030.00617.99
8.1.60.0090.00018.24
8.1.50.0100.00318.03
8.1.40.0030.00718.05
8.1.30.0060.00318.29
8.1.20.0000.00918.13
8.1.10.0030.00718.12
8.1.00.0000.00918.00
8.0.300.0030.00621.54
8.0.290.0000.00917.38
8.0.280.0040.00418.95
8.0.270.0000.00817.80
8.0.260.0000.00918.95
8.0.250.0050.00517.61
8.0.240.0040.00417.48
8.0.230.0040.00417.42
8.0.220.0090.00017.50
8.0.210.0090.00017.37
8.0.200.0050.00317.41
8.0.190.0060.00317.52
8.0.180.0030.00617.52
8.0.170.0070.00317.54
8.0.160.0030.00617.57
8.0.150.0050.00517.37
8.0.140.0090.00017.50
8.0.130.0070.00013.90
8.0.120.0030.00617.48
8.0.110.0060.00317.41
8.0.100.0090.00017.56
8.0.90.0030.00617.36
8.0.80.0090.01617.52
8.0.70.0060.00317.43
8.0.60.0030.00617.55
8.0.50.0030.00617.55
8.0.30.0080.01417.77
8.0.20.0110.01117.88
8.0.10.0000.00917.48
8.0.00.0110.00917.34
7.4.330.0060.00015.55
7.4.320.0050.00317.14
7.4.300.0040.00417.14
7.4.290.0030.00617.20
7.4.280.0000.00917.27
7.4.270.0030.00517.18
7.4.260.0030.00617.14
7.4.250.0030.00617.17
7.4.240.0030.00617.23
7.4.230.0030.00617.16
7.4.220.0060.00317.10
7.4.210.0120.00517.21
7.4.200.0000.00817.08
7.4.160.0090.01017.17
7.4.140.0100.01117.86
7.4.130.0030.01617.29
7.4.120.0030.01716.96
7.4.110.0070.01317.12
7.4.100.0180.00917.20
7.4.90.0100.01017.27
7.4.80.0170.01019.39
7.4.70.0140.01417.04
7.4.60.0140.01117.07
7.4.50.0160.00016.91
7.4.40.0070.01817.11
7.4.00.0060.01315.67
7.3.330.0000.00613.65
7.3.320.0040.00413.73
7.3.310.0030.00616.71
7.3.300.0030.00616.88
7.3.290.0000.00816.80
7.3.280.0090.01016.88
7.3.260.0080.01117.03
7.3.240.0130.00617.01
7.3.230.0040.01516.94
7.3.210.0120.00617.23
7.3.200.0070.01416.92
7.3.190.0130.00616.87
7.3.180.0170.00716.91
7.3.170.0180.00617.05
7.3.160.0160.00916.95
7.3.120.0100.01315.51
7.3.110.0120.00915.38
7.3.100.0120.00515.45
7.3.90.0060.00815.46
7.3.80.0050.01015.49
7.3.70.0110.00915.52
7.3.60.0100.00515.46
7.3.50.0110.00615.44
7.3.40.0030.01315.26
7.3.30.0030.01115.45
7.3.20.0020.01616.60
7.3.10.0100.00716.66
7.3.00.2460.00915.86
7.2.330.0060.01317.38
7.2.320.0110.01017.11
7.2.310.0100.01017.27
7.2.300.0060.01217.04
7.2.290.0120.00617.40
7.2.250.0110.00815.71
7.2.240.0070.01715.68
7.2.230.0060.01315.64
7.2.220.0090.00615.72
7.2.210.0080.00815.49
7.2.200.0080.01115.75
7.2.190.0050.01015.64
7.2.180.0030.01615.75
7.2.170.0020.01115.64
7.2.130.1630.00915.72
7.2.120.0090.01015.64
7.2.110.0120.00715.63
7.2.100.0110.00915.61
7.2.90.1680.00915.69
7.2.80.1560.01015.72
7.2.70.0980.00715.86
7.2.60.1400.00915.91
7.2.50.1420.01215.84
7.2.40.0940.00915.79
7.2.30.1150.01315.83
7.2.20.1910.00715.94
7.2.10.1830.01215.64
7.2.00.2280.00815.87
7.1.330.0080.00917.64
7.1.320.0020.01217.61
7.1.310.0050.01417.64
7.1.300.0030.01117.71
7.1.290.0050.01317.69
7.1.280.0080.01217.73
7.1.270.0090.00817.64
7.1.260.0040.01217.78
7.1.250.5370.01215.76
7.0.330.2230.01214.38
5.6.380.0100.02417.25

preferences:
33.99 ms | 400 KiB | 5 Q