3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '$£%wow!😮'; echo 'No mb: ' . strlen($string) . PHP_EOL; echo 'With mb: ' . mb_strlen($string) . PHP_EOL; $chrArray = preg_split('//u', $string, -1, PREG_SPLIT_NO_EMPTY); foreach ($chrArray as $chr) { echo $chr . ' ' . strlen($chr) . PHP_EOL; }

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.20.0060.00318.07
8.4.10.0060.01320.13
8.3.140.0070.01116.65
8.3.130.0030.00518.62
8.3.120.0050.00520.75
8.3.110.0080.00016.91
8.3.100.0050.00518.55
8.3.90.0110.00726.77
8.3.80.0060.00316.88
8.3.70.0140.00416.63
8.3.60.0170.00318.56
8.3.50.0160.00723.57
8.3.40.0060.00918.96
8.3.30.0070.01018.78
8.3.20.0080.00020.73
8.3.10.0040.00421.89
8.3.00.0040.00420.64
8.2.260.0090.00916.78
8.2.250.0040.00418.82
8.2.240.0000.02018.55
8.2.230.0030.01320.94
8.2.220.0060.00924.06
8.2.210.0110.00426.77
8.2.200.0050.00518.66
8.2.190.0170.00317.00
8.2.180.0120.00318.79
8.2.170.0210.00022.96
8.2.160.0100.00322.13
8.2.150.0070.00424.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00821.17
8.2.110.0080.00021.30
8.2.100.0030.00918.03
8.2.90.0040.00417.88
8.2.80.0050.00318.86
8.2.70.0000.00817.75
8.2.60.0060.00318.04
8.2.50.0030.00518.07
8.2.40.0000.00920.20
8.2.30.0030.00518.13
8.2.20.0040.00418.07
8.2.10.0060.00319.18
8.2.00.0040.00419.38
8.1.310.0030.00616.89
8.1.300.0090.00018.30
8.1.290.0060.00330.84
8.1.280.0030.01425.92
8.1.270.0080.00020.77
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00322.50
8.1.230.0040.00817.82
8.1.220.0090.00017.78
8.1.210.0030.00618.77
8.1.200.0060.00317.48
8.1.190.0030.00517.35
8.1.180.0040.00418.10
8.1.170.0000.00818.63
8.1.160.0050.00318.82
8.1.150.0050.00218.89
8.1.140.0000.00918.90
8.1.130.0030.00320.38
8.1.120.0000.00817.52
8.1.110.0000.00917.59
8.1.100.0050.00217.55
8.1.90.0040.00417.49
8.1.80.0080.00017.64
8.1.70.0000.00817.61
8.1.60.0080.00017.75
8.1.50.0050.00317.64
8.1.40.0040.00417.68
8.1.30.0040.00417.75
8.1.20.0000.00817.85
8.1.10.0040.00417.67
8.1.00.0000.00717.54
8.0.300.0060.00618.77
8.0.290.0080.00016.88
8.0.280.0050.00318.52
8.0.270.0000.00718.17
8.0.260.0050.00220.18
8.0.250.0030.00317.23
8.0.240.0040.00417.20
8.0.230.0030.00317.17
8.0.220.0000.00717.02
8.0.210.0040.00417.04
8.0.200.0000.00717.20
8.0.190.0060.00317.22
8.0.180.0040.00417.05
8.0.170.0050.00317.16
8.0.160.0040.00417.07
8.0.150.0050.00317.08
8.0.140.0040.00417.15
8.0.130.0000.00613.54
8.0.120.0060.00317.12
8.0.110.0040.00417.02
8.0.100.0040.00417.17
8.0.90.0040.00417.18
8.0.80.0090.00617.04
8.0.70.0000.00717.06
8.0.60.0000.00716.93
8.0.50.0020.00517.14
8.0.30.0110.00817.43
8.0.20.0150.00717.15
8.0.10.0040.00417.12
8.0.00.0150.00317.13
7.4.330.0000.00516.80
7.4.320.0030.00316.70
7.4.300.0090.00016.75
7.4.290.0070.00016.79
7.4.280.0030.00516.82
7.4.270.0040.00416.80
7.4.260.0080.00013.47
7.4.250.0000.00816.65
7.4.240.0040.00316.79
7.4.230.0000.00716.87
7.4.220.0030.00316.81
7.4.210.0080.00816.88
7.4.200.0030.00316.65
7.4.130.0090.01116.80
7.4.120.0120.00916.79
7.4.110.0090.00916.64
7.4.100.0150.00616.81
7.4.90.0110.00716.66
7.4.80.0000.01719.39
7.4.70.0130.00316.56
7.4.60.0100.00716.79
7.4.50.0050.01116.71
7.4.40.0070.01116.60
7.4.20.0100.00716.54
7.4.10.0160.00016.38
7.4.00.0070.01616.71
7.3.330.0030.00716.54
7.3.320.0050.00013.46
7.3.310.0000.00716.46
7.3.300.0070.00016.37
7.3.290.0070.00716.53
7.3.260.0090.00916.40
7.3.240.0090.00816.53
7.3.230.0140.00316.44
7.3.210.0110.00616.76
7.3.200.0110.00716.78
7.3.190.0080.00816.39
7.3.180.0160.00016.50
7.3.170.0040.01516.86
7.3.160.0130.00316.70
7.3.140.0100.01316.24
7.3.130.0030.01316.61
7.3.120.0060.01616.42
7.3.110.0080.01216.24
7.3.100.0130.00316.49
7.3.90.0170.00316.60
7.3.80.0070.01016.67
7.3.70.0000.02316.54
7.3.60.0090.01316.54
7.3.50.0130.01016.69
7.3.40.0070.01516.31
7.3.30.0030.02016.50
7.3.20.0100.01316.48
7.3.10.0120.00916.47
7.3.00.0120.00916.45
7.2.330.0120.00816.92
7.2.320.0030.01416.84
7.2.310.0060.01216.88
7.2.300.0130.00916.93
7.2.290.0080.00816.93
7.2.270.0030.01716.77
7.2.260.0030.01516.86
7.2.250.0070.01716.81
7.2.240.0090.01616.79
7.2.230.0130.00316.77
7.2.220.0060.01516.76
7.2.210.0090.01216.71
7.2.200.0120.01216.66
7.2.190.0180.00616.92
7.2.180.0120.01216.62
7.2.170.0090.00916.64
7.2.160.0100.01316.73
7.2.150.0100.01216.67
7.2.140.0130.00916.87
7.2.130.0100.01316.90
7.2.120.0070.01316.63
7.2.110.0150.00316.75
7.2.100.0090.00916.92
7.2.90.0160.00916.67
7.2.80.0000.01916.55
7.2.70.0160.00916.89
7.2.60.0060.01916.80
7.2.50.0050.02016.75
7.2.40.0120.00616.85
7.2.30.0100.01316.85
7.2.20.0080.01416.82
7.2.10.0060.01516.73
7.2.00.0040.01316.71

preferences:
36.29 ms | 403 KiB | 5 Q