3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '🏴󠁧󠁢󠁥󠁮󠁧󠁿'; $res = [ 'strlen' => strlen($str), 'mb_strlen' => mb_strlen($str), 'grapheme_strlen' => grapheme_strlen($str), ]; echo json_encode($res, JSON_PRETTY_PRINT); /* { "strlen": 28, "mb_strlen": 7, "grapheme_strlen": 1 } */

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.130.0060.00319.42
8.3.120.0100.00021.73
8.3.110.0030.00619.27
8.3.100.0040.00419.40
8.3.90.0100.00026.77
8.3.80.0280.00225.13
8.3.70.0200.01225.07
8.3.60.0200.01024.23
8.3.50.0110.00725.98
8.3.40.0230.01025.30
8.3.30.0170.00925.59
8.3.20.0130.01127.70
8.3.10.0210.00327.75
8.3.00.0180.00528.50
8.2.250.0090.00019.58
8.2.240.0090.00018.45
8.2.230.0140.00720.94
8.2.220.0040.00424.06
8.2.210.0090.00926.77
8.2.200.0170.00824.86
8.2.190.0260.00624.36
8.2.180.0160.00628.38
8.2.170.0140.01326.90
8.2.160.0170.00026.90
8.2.150.0060.00828.25
8.2.140.0080.00527.75
8.2.130.0120.00228.50
8.2.120.0120.00226.40
8.2.110.0090.00926.44
8.2.100.0160.01124.81
8.2.90.0180.00424.79
8.2.80.0230.00425.35
8.2.70.0240.00524.67
8.2.60.0190.00324.88
8.2.50.0170.00824.79
8.2.40.0180.00724.79
8.2.30.0170.00424.92
8.2.20.0190.00226.08
8.2.10.0180.00525.01
8.2.00.0140.01025.53
8.1.300.0030.00619.49
8.1.290.0190.00730.84
8.1.280.0190.01228.38
8.1.270.0150.00827.41
8.1.260.0200.00228.59
8.1.250.0210.00429.46
8.1.240.0170.00924.60
8.1.230.0170.00924.83
8.1.220.0190.00624.80
8.1.210.0190.00624.80
8.1.200.0190.00424.48
8.1.190.0170.00624.53
8.1.180.0230.00225.42
8.1.170.0180.00524.63
8.1.160.0100.01025.32
8.1.150.0250.00325.20
8.1.140.0160.00824.57
8.1.130.0200.00325.36
8.1.120.0180.00724.58
8.1.110.0190.00724.62
8.1.100.0180.00724.54
8.1.90.0210.00324.57
8.1.80.0190.00624.58
8.1.70.0180.00724.61
8.1.60.0200.00824.68
8.1.50.0230.00524.65
8.1.40.0190.00324.67
8.1.30.0200.00624.69
8.1.20.0200.00724.74
8.1.10.0160.01124.74
8.1.00.0190.01024.64
8.0.300.0170.00724.80
8.0.290.0130.00924.29
8.0.280.0140.00825.16
8.0.270.0160.00724.32
8.0.260.0180.00225.15
8.0.250.0170.00324.34
8.0.240.0180.00324.33
8.0.230.0160.00624.31
8.0.220.0150.00524.25
8.0.210.0140.00924.26
8.0.200.0170.00824.27
8.0.190.0180.01024.30
8.0.180.0190.00724.23
8.0.170.0200.00424.30
8.0.160.0170.00624.26
8.0.150.0120.01224.29
8.0.140.0200.00724.22
8.0.130.0190.00924.30
8.0.120.0170.01024.32
8.0.110.0190.00524.29
8.0.100.0150.00924.36
8.0.90.0150.01024.40
8.0.80.0190.00324.33
8.0.70.0210.00724.37
8.0.60.0210.00624.23
8.0.50.0210.00824.33
8.0.30.0270.00324.39
8.0.20.0150.01224.44
8.0.10.0210.00524.42
7.4.330.0080.00923.19
7.4.320.0130.00824.14
7.4.300.0190.00424.06
7.4.290.0270.00324.09
7.4.280.0180.00624.17
7.4.270.0200.00324.18
7.4.260.0170.00724.08
7.4.250.0150.00524.13
7.4.240.0110.00324.14
7.4.230.0220.00224.13
7.4.220.0300.00224.15
7.4.210.0240.00424.13
7.4.200.0140.00624.08
7.4.190.0150.00824.16
7.4.180.0220.00624.20
7.4.160.0170.01224.15
7.4.150.0210.00524.04
7.4.140.0200.00224.07
7.4.130.0210.00724.08
7.4.120.0170.01124.10
7.4.110.0210.00624.07
7.4.100.0230.00624.11
7.4.90.0230.00724.13
7.4.80.0210.00724.12
7.4.70.0190.00424.09
7.4.60.0220.00324.09
7.4.50.0220.00424.06
7.4.40.0230.00524.04
7.4.30.0210.00924.10
7.4.20.0200.01124.12
7.4.10.0200.00624.15
7.4.00.0200.00424.08

preferences:
26.66 ms | 403 KiB | 5 Q