3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "ABCDEFGHIK"; $num = str_split($text ,3); $cnt = 0; $total = 0; for($b = 0; $b<3; $b++){ $cnt = strlen($num[$b]); $total += $cnt; } echo $cnt; echo "\n"; echo $total;

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.40.0070.00718.65
8.3.30.0090.00618.71
8.3.20.0040.00420.29
8.3.10.0080.00023.53
8.3.00.0040.00423.64
8.2.170.0100.00722.96
8.2.160.0150.00621.24
8.2.150.0080.00025.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00020.90
8.2.110.0090.00020.38
8.2.100.0070.00417.91
8.2.90.0060.00317.63
8.2.80.0040.00418.78
8.2.70.0050.00317.63
8.2.60.0040.00418.05
8.2.50.0000.00818.07
8.2.40.0000.00817.93
8.2.30.0000.00719.97
8.2.20.0070.00018.12
8.2.10.0030.00517.99
8.2.00.0040.00418.11
8.1.270.0000.00722.19
8.1.260.0050.00326.35
8.1.250.0050.00228.09
8.1.240.0060.00319.09
8.1.230.0080.00317.72
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0040.00417.10
8.1.180.0080.00018.10
8.1.170.0040.00418.60
8.1.160.0070.00018.87
8.1.150.0040.00420.50
8.1.140.0000.00817.68
8.1.130.0000.00718.80
8.1.120.0000.00717.39
8.1.110.0060.00317.38
8.1.100.0050.00317.31
8.1.90.0040.00417.27
8.1.80.0030.00617.38
8.1.70.0000.00717.24
8.1.60.0040.00417.50
8.1.50.0000.00917.46
8.1.40.0050.00217.47
8.1.30.0050.00317.58
8.1.20.0000.00817.59
8.1.10.0000.00717.48
8.1.00.0030.00517.57
8.0.300.0030.00618.77
8.0.290.0000.00716.63
8.0.280.0070.00018.34
8.0.270.0090.00017.25
8.0.260.0000.00618.61
8.0.250.0000.00716.82
8.0.240.0070.00416.94
8.0.230.0000.00716.80
8.0.220.0070.00016.82
8.0.210.0000.00716.81
8.0.200.0000.00816.86
8.0.190.0000.00716.85
8.0.180.0000.00916.80
8.0.170.0030.00316.78
8.0.160.0030.00316.82
8.0.150.0060.00316.70
8.0.140.0000.00716.78
8.0.130.0000.00513.18
8.0.120.0070.00016.82
8.0.110.0080.00016.66
8.0.100.0040.00416.72
8.0.90.0000.00816.79
8.0.80.0030.01716.88
8.0.70.0000.00716.74
8.0.60.0000.00816.68
8.0.50.0040.00416.83
8.0.30.0080.00917.00
8.0.20.0090.01017.40
8.0.10.0000.00816.93
8.0.00.0090.00916.82
7.4.330.0000.00516.68
7.4.320.0030.00316.56
7.4.300.0060.00016.50
7.4.290.0030.00316.39
7.4.280.0000.00816.41
7.4.270.0030.00516.48
7.4.260.0000.00816.44
7.4.250.0040.00416.45
7.4.240.0000.00716.43
7.4.230.0000.00716.52
7.4.220.0030.01616.55
7.4.210.0000.01616.64
7.4.200.0000.00716.57
7.4.160.0110.00616.49
7.4.150.0070.01017.40
7.4.140.0070.01117.86
7.4.130.0060.01616.46
7.4.120.0110.00716.61
7.4.110.0060.01316.64
7.4.100.0110.00816.53
7.4.90.0130.01016.52
7.4.80.0070.01719.39
7.4.70.0080.00816.54
7.4.60.0090.00916.34
7.4.50.0060.01016.58
7.4.40.0140.00316.61
7.4.30.0090.00616.31
7.4.00.0110.00415.18
7.3.330.0050.00013.20
7.3.320.0030.00313.17
7.3.310.0030.00316.29
7.3.300.0000.00716.36
7.3.290.0070.00616.34
7.3.280.0080.00916.31
7.3.270.0110.00617.40
7.3.260.0120.00916.46
7.3.250.0080.01216.35
7.3.240.0090.00816.35
7.3.230.0100.00716.54
7.3.210.0070.01716.57
7.3.200.0060.00916.31
7.3.190.0110.00416.33
7.3.180.0090.01216.51
7.3.170.0110.01516.48
7.3.160.0120.00416.35
7.3.10.0040.01116.57
7.3.00.0030.01416.67
7.2.330.0140.00316.73
7.2.320.0060.01116.78
7.2.310.0090.01216.74
7.2.300.0140.00416.77
7.2.290.0140.00316.79
7.2.130.0080.00416.91
7.2.120.0140.00316.64
7.2.110.0090.00617.09
7.2.100.0130.00616.90
7.2.90.0100.00717.14
7.2.80.0030.00716.78
7.2.70.0030.00616.96
7.2.60.0090.00817.06
7.2.50.0000.01616.71
7.2.40.0070.00716.95
7.2.30.0110.00416.66
7.2.20.0070.00316.75
7.2.10.0080.00616.78
7.2.00.0030.01016.69
7.1.250.0040.00715.75
7.1.200.0060.00615.55
7.1.110.0030.00918.47
7.1.100.0090.00918.02
7.1.90.0190.01318.34
7.1.80.0240.01718.17
7.1.70.0180.01217.02
7.1.60.0160.01635.19
7.1.50.0240.01534.79
7.1.40.0260.01734.33
7.1.30.0270.01234.62
7.1.20.0280.00434.70
7.1.10.0310.01916.54
7.1.00.0070.01016.68
7.0.250.0090.00317.88
7.0.240.0120.00417.84
7.0.230.0200.01016.13
7.0.220.0300.01016.20
7.0.210.0060.01216.83
7.0.200.0270.00816.76
7.0.190.0350.00616.80
7.0.180.0710.01014.71
7.0.170.0290.01416.23
7.0.160.0060.00916.24
7.0.150.0060.01616.20
7.0.140.0070.01016.20
7.0.130.0040.01516.76
7.0.120.0230.01014.95
7.0.110.0130.00716.50
7.0.100.0100.01016.35
7.0.90.0150.01914.65
7.0.80.0140.01016.36
7.0.70.0100.00316.27
7.0.60.0230.01016.00
7.0.50.0060.01016.41
7.0.40.0150.00914.50
7.0.30.0130.01514.65
7.0.20.0030.01016.37
7.0.10.0030.01016.39
7.0.00.0100.00316.48

preferences:
54.92 ms | 400 KiB | 5 Q