3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "B1A23R4CD"; $chars = str_split($string); $output = [[], []]; foreach ($chars as $char) { $output[ctype_alpha($char)][] = $char; // ^^^^^^^^^^^^^^^^^^- false is 0, true is 1 } var_export($output);

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.4.120.0050.00522.36
8.4.110.0060.00419.08
8.4.100.0060.00317.37
8.4.90.0110.01020.48
8.4.80.0050.00420.56
8.4.70.0090.01117.76
8.4.60.0120.01024.14
8.4.50.0130.00720.46
8.4.40.0120.00819.23
8.4.30.0030.01618.66
8.4.20.0060.01320.54
8.4.10.0050.00317.64
8.3.250.0050.00518.79
8.3.240.0050.00416.57
8.3.230.0120.00816.44
8.3.220.0090.00718.91
8.3.210.0100.01016.69
8.3.200.0050.00316.43
8.3.190.0120.00617.28
8.3.180.0100.00516.61
8.3.170.0150.00317.13
8.3.160.0070.01116.54
8.3.150.0150.00418.28
8.3.140.0030.00617.13
8.3.130.0030.01718.23
8.3.120.0130.00320.64
8.3.110.0040.00420.94
8.3.100.0080.00024.06
8.3.90.0080.00026.77
8.3.80.0050.00518.28
8.3.70.0110.00418.30
8.3.60.0100.01018.68
8.3.50.0110.00721.95
8.3.40.0110.00418.72
8.3.30.0040.01218.63
8.3.20.0050.00321.95
8.3.10.0050.00220.34
8.3.00.0040.00423.48
8.2.290.0120.00722.43
8.2.280.0100.00618.69
8.2.270.0200.00017.04
8.2.260.0100.00016.58
8.2.250.0060.00316.56
8.2.240.0040.00418.93
8.2.230.0040.00422.58
8.2.220.0000.00937.54
8.2.210.0060.01326.77
8.2.200.0030.00618.16
8.2.190.0070.00716.63
8.2.180.0040.01116.63
8.2.170.0040.01119.09
8.2.160.0130.00022.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00722.34
8.2.110.0090.00022.05
8.2.100.0040.00717.78
8.2.90.0000.00922.20
8.2.80.0000.00818.02
8.2.70.0040.00418.16
8.2.60.0000.00818.15
8.2.50.0060.00318.10
8.2.40.0000.00921.15
8.2.30.0000.00819.32
8.2.20.0040.00418.12
8.2.10.0080.00019.33
8.2.00.0050.00219.18
8.1.330.0100.00918.48
8.1.320.0130.00716.23
8.1.310.0060.00318.29
8.1.300.0040.00419.75
8.1.290.0060.00330.84
8.1.280.0090.00625.92
8.1.270.0040.00420.77
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0080.00022.59
8.1.230.0000.01020.78
8.1.220.0000.00817.78
8.1.210.0040.00418.85
8.1.200.0080.00017.35
8.1.190.0030.00617.10
8.1.180.0080.00018.10
8.1.170.0040.00418.42
8.1.160.0000.00718.89
8.1.150.0050.00218.76
8.1.140.0040.00422.21
8.1.130.0030.00320.17
8.1.120.0090.00017.52
8.1.110.0000.00717.29
8.1.100.0070.00017.46
8.1.90.0000.00717.47
8.1.80.0000.00717.50
8.1.70.0040.00417.45
8.1.60.0060.00317.48
8.1.50.0050.00217.51
8.1.40.0030.00617.57
8.1.30.0100.00317.52
8.1.20.0030.00617.58
8.1.10.0000.00817.47
8.1.00.0070.00017.34
8.0.300.0040.00420.01
8.0.290.0070.00316.75
8.0.280.0070.00018.44
8.0.270.0000.00916.83
8.0.260.0040.00420.06
8.0.250.0070.00016.98
8.0.240.0000.00716.92
8.0.230.0000.00716.87
8.0.220.0000.00716.91
8.0.210.0030.00316.80
8.0.200.0030.00316.97
8.0.190.0050.00316.94
8.0.180.0030.00516.97
8.0.170.0000.00916.79
8.0.160.0070.00016.86
8.0.150.0030.00316.66
8.0.140.0000.00716.77
8.0.130.0000.00513.32
8.0.120.0050.00216.82
8.0.110.0030.00416.86
8.0.100.0040.00417.00
8.0.90.0030.00616.79
8.0.80.0060.00916.87
8.0.70.0070.00016.91
8.0.60.0040.00416.93
8.0.50.0020.00516.76
8.0.30.0060.01217.06
8.0.20.0090.01016.88
8.0.10.0030.00516.91
8.0.00.0130.00916.69
7.4.330.0000.00515.55
7.4.320.0030.00316.52
7.4.300.0060.00016.50
7.4.290.0040.00416.39
7.4.280.0040.00416.53
7.4.270.0040.00416.50
7.4.260.0040.00416.48
7.4.250.0030.00316.61
7.4.240.0020.00516.52
7.4.230.0030.00316.60
7.4.220.0020.00516.40
7.4.210.0070.00816.48
7.4.200.0020.00516.52
7.4.140.0090.00917.86
7.4.130.0170.00316.41
7.4.120.0140.00316.57
7.4.110.0070.01016.58
7.4.100.0150.00916.61
7.4.90.0060.01316.55
7.4.80.0040.01219.39
7.4.70.0120.00316.42
7.4.60.0090.00616.72
7.4.50.0030.01016.25
7.4.40.0160.00016.38
7.4.00.0030.01414.94
7.3.330.0070.00013.07
7.3.320.0050.00013.07
7.3.310.0000.00716.41
7.3.300.0030.00316.22
7.3.290.0030.00316.32
7.3.280.0130.00616.32
7.3.260.0070.01016.40
7.3.230.0040.01516.52
7.3.210.0140.00816.65
7.3.200.0100.00616.31
7.3.190.0070.01116.52
7.3.180.0060.01116.18
7.3.170.0090.00616.30
7.3.160.0140.00316.44
7.3.70.0090.00614.57
7.3.60.0000.01514.51
7.3.50.0060.01014.61
7.3.40.0100.00614.46
7.3.30.0030.00914.30
7.3.20.0100.00016.59
7.3.10.0060.00916.57
7.3.00.0060.00616.46
7.2.330.0100.00716.80
7.2.320.0140.01116.70
7.2.310.0100.00616.44
7.2.300.0060.00916.76
7.2.290.0030.01416.71
7.2.200.0060.01014.87
7.2.190.0130.00314.75
7.2.180.0090.00314.82
7.2.170.0030.01314.89
7.2.160.0070.00714.86
7.2.150.0040.01116.93
7.2.140.0150.00316.69
7.2.130.0070.00716.85
7.2.120.0060.00816.68
7.2.110.0030.01016.77
7.2.100.0090.00616.90
7.2.90.0090.00916.73
7.2.80.0100.00716.84
7.2.70.0140.00316.76
7.2.60.0090.00916.91
7.2.50.0070.01116.95
7.2.40.0060.00616.87
7.2.30.0120.00016.93
7.2.20.0040.00916.94
7.2.10.0100.00516.80
7.2.00.0110.00416.82
7.1.300.0110.00415.69
7.1.290.0070.00715.59
7.1.280.0060.01015.54
7.1.270.0030.00915.78
7.1.260.0110.00415.86
7.1.250.0070.00715.71

preferences:
30.79 ms | 403 KiB | 5 Q