3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "abcdأبتث"; $charsCount = mb_strlen($string); for($i = 0; $i < $charsCount; $i++){ $char = mb_substr($string, $i, 1); var_dump($char); }

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.10.0030.00617.48
8.3.140.0040.00422.43
8.3.130.0090.00616.50
8.3.120.0080.00019.09
8.3.110.0040.00420.94
8.3.100.0060.01224.06
8.3.90.0030.00626.77
8.3.80.0060.00316.63
8.3.70.0040.01116.58
8.3.60.0120.00916.38
8.3.50.0110.00817.29
8.3.40.0040.01118.72
8.3.30.0110.00418.73
8.3.20.0050.00320.27
8.3.10.0040.00421.87
8.3.00.0000.00822.32
8.2.250.0100.00716.54
8.2.240.0080.00018.73
8.2.230.0000.00822.58
8.2.220.0060.00337.54
8.2.210.0140.00326.77
8.2.200.0060.00316.38
8.2.190.0100.00716.58
8.2.180.0070.01325.92
8.2.170.0040.01118.83
8.2.160.0070.00722.96
8.2.150.0080.00025.66
8.2.140.0050.00324.66
8.2.130.0030.00526.16
8.2.120.0050.00221.06
8.2.110.0070.01020.54
8.2.100.0080.00417.78
8.2.90.0030.00517.63
8.2.80.0040.00418.66
8.2.70.0000.00817.80
8.2.60.0040.00417.50
8.2.50.0080.00017.55
8.2.40.0040.00418.22
8.2.30.0040.00418.06
8.2.20.0040.00417.91
8.2.10.0020.00519.20
8.2.00.0000.00719.23
8.1.300.0060.00317.67
8.1.290.0060.00318.88
8.1.280.0100.01025.92
8.1.270.0060.00824.66
8.1.260.0050.00326.35
8.1.250.0070.01128.09
8.1.240.0030.00623.69
8.1.230.0110.00023.76
8.1.220.0040.00417.76
8.1.210.0040.00418.77
8.1.200.0000.00817.23
8.1.190.0000.00817.23
8.1.180.0060.00618.10
8.1.170.0030.00518.64
8.1.160.0040.00418.81
8.1.150.0070.00018.79
8.1.140.0000.00720.80
8.1.130.0030.00519.98
8.1.120.0000.00717.44
8.1.110.0070.00017.37
8.1.100.0070.00017.43
8.1.90.0030.00517.29
8.1.80.0040.00417.35
8.1.70.0060.00317.36
8.1.60.0040.00417.47
8.1.50.0040.00417.52
8.1.40.0040.00417.55
8.1.30.0030.00617.55
8.1.20.0030.00617.53
8.1.10.0000.00717.52
8.1.00.0040.00417.41
8.0.300.0040.00418.77
8.0.290.0090.00016.75
8.0.280.0040.00418.37
8.0.270.0000.00716.83
8.0.260.0050.00321.98
8.0.250.0040.00416.85
8.0.240.0060.00017.00
8.0.230.0030.00316.95
8.0.220.0000.00716.78
8.0.210.0000.00716.76
8.0.200.0000.00616.96
8.0.190.0000.00816.96
8.0.180.0040.00416.90
8.0.170.0030.00616.75
8.0.160.0050.00216.79
8.0.150.0040.00416.69
8.0.140.0060.00316.76
8.0.130.0040.00413.33
8.0.120.0050.00316.75
8.0.110.0040.00416.87
8.0.100.0050.00216.70
8.0.90.0000.00716.78
8.0.80.0060.01016.88
8.0.70.0040.00416.78
8.0.60.0040.00416.87
8.0.50.0040.00416.74
8.0.30.0090.00917.04
8.0.20.0170.00917.40
8.0.10.0050.01417.17
8.0.00.0070.01116.83
7.4.330.0000.00516.84
7.4.320.0000.00616.36
7.4.300.0030.00316.51
7.4.290.0080.00016.46
7.4.280.0040.00416.48
7.4.270.0070.00016.46
7.4.260.0030.00313.18
7.4.250.0050.00316.39
7.4.240.0000.00816.50
7.4.230.0000.00716.32
7.4.220.0000.00816.24
7.4.210.0050.01116.46
7.4.200.0000.00716.45
7.4.150.0060.01217.40
7.4.140.0120.00717.37
7.4.130.0080.01116.77
7.4.120.0100.01016.78
7.4.110.0070.01316.72
7.4.100.0130.01416.76
7.4.90.0160.00716.79
7.4.80.0060.01416.66
7.4.70.0070.01216.68
7.4.60.0100.00816.69
7.4.50.0090.00816.49
7.4.40.0110.00616.60
7.4.30.0110.00816.82
7.4.20.0070.01116.66
7.4.10.0160.00516.27
7.4.00.0080.01015.72
7.3.330.0080.00016.09
7.3.320.0030.00313.06
7.3.310.0030.00316.39
7.3.300.0000.00716.16
7.3.290.0070.00016.30
7.3.270.0130.00517.40
7.3.260.0110.01016.52
7.3.250.0110.00816.94
7.3.240.0120.00816.47
7.3.230.0200.00816.81
7.3.220.0140.01416.95
7.3.210.0090.01016.76
7.3.200.0120.00816.68
7.3.190.0120.00816.67
7.3.180.0080.01116.61
7.3.170.0120.01416.74
7.3.160.0120.00616.71
7.3.150.0100.00716.77
7.3.140.0090.01016.75
7.3.130.0100.00916.34
7.3.120.0120.00715.74
7.3.110.0120.00815.57
7.3.100.0110.00915.62
7.3.90.0120.00815.49
7.3.80.0060.01315.47
7.3.70.0130.00715.42
7.3.60.0090.00915.42
7.3.50.0080.01115.50
7.3.40.0100.00915.43
7.3.30.0120.00615.41
7.3.20.0100.01116.39
7.3.10.0130.00716.35
7.3.00.0080.01116.37
7.2.340.0260.02416.94
7.2.330.0220.00816.80
7.2.320.0280.01316.69
7.2.310.0200.00716.80
7.2.300.0190.00816.76
7.2.290.0150.01216.74
7.2.280.0170.01016.82
7.2.270.0220.01416.76
7.2.260.0120.01216.29
7.2.250.0130.01215.88
7.2.240.0160.00915.80
7.2.230.0150.01015.72
7.2.220.0160.00915.68
7.2.210.0130.01015.66
7.2.200.0120.01115.62
7.2.190.0140.00915.70
7.2.180.0130.01015.64
7.2.170.0120.01115.55
7.2.160.0160.00815.89
7.2.150.0160.01016.57
7.2.140.0150.00916.55
7.2.130.0150.00916.52
7.2.120.0170.00816.56
7.2.110.0170.00716.58
7.2.100.0160.00916.43
7.2.90.0190.00716.55
7.2.80.0160.00916.51
7.2.70.0170.01016.53
7.2.60.0140.01016.53
7.2.50.0130.01116.58
7.2.40.0090.01316.50
7.2.30.0120.01216.56
7.2.20.0140.00916.55
7.2.10.0180.00616.48
7.2.00.0180.00916.45
7.1.330.0170.01116.00
7.1.320.0170.00915.95
7.1.310.0160.00815.97
7.1.300.0160.00615.69
7.1.290.0170.00615.70
7.1.280.0170.00915.72
7.1.270.0140.00815.72
7.1.260.0130.01015.68
7.1.250.0170.00815.63
7.1.240.0220.01216.06
7.1.230.0170.00716.02
7.1.220.0220.00616.10
7.1.210.0130.01316.00
7.1.200.0160.01216.03
7.1.190.0290.01016.07
7.1.180.0180.00816.02
7.1.170.0170.00916.07
7.1.160.0120.01116.07
7.1.150.0160.00816.11
7.1.140.0210.00716.09
7.1.130.0200.01316.00
7.1.120.0240.00716.01
7.1.110.0140.01116.07
7.1.100.0170.00815.97
7.1.90.0160.01115.94
7.1.80.0200.00816.06
7.1.70.0190.00816.14
7.1.60.0350.00916.01
7.1.50.0220.00515.98
7.1.40.0210.00816.03
7.1.30.0200.00816.06
7.1.20.0180.00916.02
7.1.10.0200.00616.04
7.1.00.0190.00816.04

preferences:
67.57 ms | 403 KiB | 5 Q