3v4l.org

run code in 300+ PHP versions simultaneously
<?php $emoji = '๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง'; echo $emoji. "\n"; echo strlen($emoji) . "\n";// 25 echo mb_strlen($emoji) . "\n";// 7 echo mb_strlen($emoji, "UTF-16") . "\n";// 12 var_dump(str_split($emoji)); // ่ฌŽใฎ 25 ๆ–‡ๅญ—้…ๅˆ— var_dump(mb_str_split($emoji)); // ็ตตๆ–‡ๅญ— 4 ใคใจ้•ทใ• 3 ใจใ•ใ‚Œใ‚‹่ฆ‹ใŸ็›ฎใ‹ใ‚‰ๆ–‡ๅญ—ๅˆ— 3 ใคใฎ 7 ๆ–‡ๅญ—้…ๅˆ— var_dump(mb_str_split($emoji, 'UTH-16')); // ็ตตๆ–‡ๅญ— 4 ใคใจ้•ทใ• 3 ใจใ•ใ‚Œใ‚‹่ฆ‹ใŸ็›ฎใ‹ใ‚‰ๆ–‡ๅญ—ๅˆ— 3 ใคใฎ 7 ๆ–‡ๅญ—้…ๅˆ— preg_match('/.{1,3}/', $emoji, $match); var_dump($match);// ่ฌŽใฎ 3 ๆ–‡ๅญ—

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.0120.00918.98
8.4.10.0170.00319.86
8.3.150.0080.00017.19
8.3.140.0070.00319.03
8.3.130.0040.00418.48
8.3.120.0030.00616.77
8.3.110.0090.00016.63
8.3.100.0000.00916.89
8.3.90.0040.00426.77
8.3.80.0050.00519.36
8.3.70.0130.00316.74
8.3.60.0090.00616.75
8.3.50.0100.01616.30
8.3.40.0120.00318.92
8.3.30.0100.01018.89
8.3.20.0000.00824.18
8.3.10.0060.00324.66
8.3.00.0030.00526.16
8.2.260.0080.00817.13
8.2.250.0120.00316.96
8.2.240.0070.01317.40
8.2.230.0080.00020.94
8.2.220.0000.00924.06
8.2.210.0050.00326.77
8.2.200.0000.01118.88
8.2.190.0030.01718.31
8.2.180.0120.00625.92
8.2.170.0030.01619.19
8.2.160.0090.00622.96
8.2.150.0050.00325.66
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0030.00626.35
8.2.110.0140.00321.09
8.2.100.0100.00317.72
8.2.90.0080.00017.84
8.2.80.0030.00619.31
8.2.70.0030.00517.93
8.2.60.0060.00318.03
8.2.50.0000.01018.10
8.2.40.0040.00421.02
8.2.30.0050.00219.25
8.2.20.0040.00418.02
8.2.10.0040.00419.38
8.2.00.0040.00518.43
8.1.310.0150.00416.74
8.1.300.0050.00317.98
8.1.290.0030.00630.84
8.1.280.0040.01525.92
8.1.270.0050.00223.99
8.1.260.0030.00628.09
8.1.250.0120.00328.09
8.1.240.0070.01521.25
8.1.230.0090.00322.75
8.1.220.0030.00617.76
8.1.210.0040.00418.88
8.1.200.0050.00517.38
8.1.190.0000.00817.35
8.1.180.0030.00518.10
8.1.170.0080.00018.71
8.1.160.0000.00920.75
8.1.150.0030.00518.98
8.1.140.0070.00018.96
8.1.130.0030.00320.14
8.1.120.0050.00217.44
8.1.110.0040.00417.43
8.1.100.0080.00017.55
8.1.90.0000.00717.55
8.1.80.0040.00417.53
8.1.70.0090.00017.43
8.1.60.0050.00317.63
8.1.50.0040.00617.56
8.1.40.0060.00717.48
8.1.30.0180.00717.69
8.1.20.0180.00317.62
8.1.10.0150.00717.54
8.1.00.0140.00817.58
8.0.300.0050.00320.15
8.0.290.0060.00316.88
8.0.280.0000.00718.44
8.0.270.0030.00516.93
8.0.260.0070.00018.57
8.0.250.0030.00517.12
8.0.240.0040.00417.11
8.0.230.0000.00717.07
8.0.220.0030.00317.08
8.0.210.0000.00717.05
8.0.200.0040.00417.16
8.0.190.0040.00417.11
8.0.180.0040.00416.96
8.0.170.0130.00316.97
8.0.160.0100.00616.96
8.0.150.0110.00616.86
8.0.140.0100.00516.93
8.0.130.0110.00215.58
8.0.120.0060.00616.95
8.0.110.0060.00916.94
8.0.100.0120.00516.88
8.0.90.0120.00517.01
8.0.80.0130.00716.96
8.0.70.0080.00616.91
8.0.60.0100.00516.96
8.0.50.0140.00317.00
8.0.30.0180.00316.96
8.0.20.0140.00916.97
8.0.10.0130.00916.94
8.0.00.0100.00617.00
7.4.330.0050.00416.79
7.4.320.0070.00016.63
7.4.300.0000.00616.77
7.4.290.0210.00816.83
7.4.280.0130.00516.63
7.4.270.0100.00716.63
7.4.260.0130.00515.55
7.4.250.0140.00616.73
7.4.240.0170.00316.77
7.4.230.0130.00416.70
7.4.220.0130.00516.66
7.4.210.0130.00516.74
7.4.200.0040.00916.74
7.4.190.0150.00416.68
7.4.180.0170.00516.80
7.4.160.0120.00916.66
7.4.150.0130.00416.60
7.4.140.0080.00916.59
7.4.130.0090.01016.66
7.4.120.0140.00416.69
7.4.110.0140.00516.59
7.4.100.0140.00416.75
7.4.90.0070.01116.69
7.4.80.0100.00816.65
7.4.70.0130.00716.57
7.4.60.0090.00816.61
7.4.50.0120.00816.55
7.4.40.0100.00716.55
7.4.30.0110.00916.67
7.4.20.0100.00716.61
7.4.10.0090.00716.57
7.4.00.0100.00716.46
7.3.330.0130.00516.33
7.3.320.0120.00515.35
7.3.310.0090.00516.35
7.3.300.0120.00516.39
7.3.290.0130.00516.48
7.3.280.0150.00516.47
7.3.270.0110.01016.45
7.3.260.0140.00616.38
7.3.250.0150.00516.38
7.3.240.0130.00616.41
7.3.230.0140.00816.36
7.3.220.0110.01016.38
7.3.210.0140.00816.32
7.3.200.0170.00616.32
7.3.190.0110.00916.36
7.3.180.0160.00616.30
7.3.170.0150.00616.34
7.3.160.0180.00416.32
7.3.150.0150.00716.36
7.3.140.0160.00416.30
7.3.130.0130.00716.32
7.3.120.0150.00616.35
7.3.110.0210.00316.23
7.3.100.0150.00716.28
7.3.90.0120.00916.57
7.3.80.0150.00716.34
7.3.70.0160.00616.27
7.3.60.0110.00916.39
7.3.50.0160.00416.42
7.3.40.0160.00516.45
7.3.30.0140.00716.42
7.3.20.0220.00917.02
7.3.10.0170.00216.92
7.3.00.0140.00816.92

preferences:
81.73 ms | 403 KiB | 5 Q