3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mb_str_split($string) { return preg_split('/(?<!^)(?!$)/u', $string ); } $string = 'My string &lsquo;to parse&rsquo;'; $string = utf8_encode($string); $string_decoded = html_entity_decode($string, ENT_QUOTES, 'utf-8'); $string_array = mb_str_split($string_decoded); var_dump($string_array);

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.5.10.0100.00720.14
8.5.00.0150.00819.84
8.4.150.0020.00114.05
8.4.140.0130.00717.74
8.4.130.0130.00717.80
8.4.120.0150.00520.33
8.4.110.0110.00922.19
8.4.100.0140.00718.44
8.4.90.0150.00718.60
8.4.80.0150.00418.84
8.4.70.0150.00518.00
8.4.60.0100.01020.47
8.4.50.0070.00718.59
8.4.40.0080.00018.50
8.4.30.0070.01017.70
8.4.20.0060.00317.90
8.4.10.0140.01017.60
8.3.280.0090.01118.29
8.3.270.0090.01016.54
8.3.260.0110.00816.50
8.3.250.0140.00518.88
8.3.240.0120.00816.80
8.3.230.0040.00416.53
8.3.220.0050.00318.93
8.3.210.0100.00216.86
8.3.200.0030.00616.72
8.3.190.0100.00819.11
8.3.180.0080.01018.39
8.3.170.0070.01117.01
8.3.160.0110.00718.15
8.3.150.0090.00920.70
8.3.140.0070.01116.53
8.3.130.0060.01016.75
8.3.120.0090.00018.89
8.3.110.0030.00516.50
8.3.100.0150.00324.06
8.3.90.0080.00026.77
8.3.80.0040.00418.30
8.3.70.0060.01316.63
8.3.60.0130.00616.61
8.3.50.0090.01422.02
8.3.40.0090.00618.71
8.3.30.0120.00318.51
8.3.20.0040.00420.34
8.3.10.0080.00023.71
8.3.00.0070.00317.83
8.2.290.0080.01020.35
8.2.280.0090.00918.49
8.2.270.0110.00717.14
8.2.260.0040.00418.72
8.2.250.0100.00316.60
8.2.240.0040.01218.73
8.2.230.0030.00620.94
8.2.220.0090.00037.54
8.2.210.0050.00326.77
8.2.200.0040.00416.38
8.2.190.0070.01116.58
8.2.180.0180.00325.92
8.2.170.0130.00718.83
8.2.160.0030.01720.38
8.2.150.0030.00524.18
8.2.140.0080.00024.66
8.2.130.0030.00519.38
8.2.120.0040.00426.35
8.2.110.0000.00820.35
8.2.100.0110.00017.91
8.2.90.0080.00018.98
8.2.80.0040.00417.97
8.2.70.0030.00617.38
8.2.60.0060.00317.80
8.2.50.0040.00418.07
8.2.40.0020.00522.23
8.2.30.0000.00720.73
8.2.20.0000.00817.55
8.2.10.0000.00717.95
8.2.00.0050.00217.86
8.1.330.0120.00521.63
8.1.320.0150.00816.16
8.1.310.0150.00018.60
8.1.300.0030.00620.16
8.1.290.0040.00430.84
8.1.280.0070.01025.92
8.1.270.0040.01120.43
8.1.260.0060.00328.09
8.1.250.0040.00428.09
8.1.240.0000.01023.84
8.1.230.0070.00417.77
8.1.220.0030.00517.74
8.1.210.0030.00518.77
8.1.200.0030.00617.00
8.1.190.0000.00817.10
8.1.180.0000.00818.10
8.1.170.0030.00518.48
8.1.160.0040.00420.49
8.1.150.0000.00718.77
8.1.140.0040.00419.50
8.1.130.0060.00317.56
8.1.120.0000.00717.27
8.1.110.0030.00317.33
8.1.100.0080.00017.23
8.1.90.0000.00817.40
8.1.80.0040.00317.22
8.1.70.0000.00817.20
8.1.60.0060.00317.39
8.1.50.0050.00317.27
8.1.40.0060.00317.32
8.1.30.0030.00617.41
8.1.20.0040.00417.41
8.1.10.0000.00817.43
8.1.00.0040.00417.33
8.0.300.0020.00518.77
8.0.290.0050.00216.63
8.0.280.0030.00318.30
8.0.270.0030.00317.17
8.0.260.0040.00417.13
8.0.250.0000.00816.94
8.0.240.0000.00716.85
8.0.230.0070.00016.77
8.0.220.0040.00416.89
8.0.210.0030.00316.84
8.0.200.0060.00016.89
8.0.190.0040.00416.91
8.0.180.0000.00716.76
8.0.170.0000.00816.76
8.0.160.0070.00016.79
8.0.150.0000.00716.75
8.0.140.0040.00416.81
8.0.130.0000.00513.25
8.0.120.0040.00416.79
8.0.110.0000.00716.79
8.0.100.0000.00716.86
8.0.90.0070.00016.87
8.0.80.0000.01616.71
8.0.70.0000.00716.83
8.0.60.0000.00816.86
8.0.50.0000.00816.79
8.0.30.0140.00516.90
8.0.20.0100.00917.40
8.0.10.0030.00516.85
8.0.00.0090.00916.63
7.4.330.0050.00016.76
7.4.320.0060.00016.38
7.4.300.0000.00716.27
7.4.290.0040.00416.45
7.4.280.0000.00716.35
7.4.270.0040.00416.36
7.4.260.0000.00716.35
7.4.250.0070.00016.41
7.4.240.0020.00616.43
7.4.230.0030.00316.22
7.4.220.0090.00616.37
7.4.210.0070.01116.46
7.4.200.0070.00016.47
7.4.160.0040.01116.52
7.4.150.0130.00317.40
7.4.140.0070.01217.86
7.4.130.0030.01316.56
7.4.120.0110.00616.42
7.4.110.0090.00816.47
7.4.100.0120.01116.32
7.4.90.0100.01016.29
7.4.80.0070.01419.39
7.4.70.0100.01316.22
7.4.60.0150.00316.45
7.4.50.0050.00816.31
7.4.40.0000.01516.52
7.4.30.0090.01316.48
7.4.00.0060.00815.05
7.3.330.0030.00313.18
7.3.320.0030.00313.40
7.3.310.0070.00016.42
7.3.300.0070.00016.41
7.3.290.0040.00416.42
7.3.280.0100.00716.50
7.3.270.0040.01317.40
7.3.260.0110.00716.70
7.3.240.0060.01216.73
7.3.230.0000.01616.65
7.3.210.0110.00716.67
7.3.200.0110.01116.54
7.3.190.0070.01016.36
7.3.180.0170.00316.58
7.3.170.0130.00316.74
7.3.160.0160.00016.70
7.3.10.0130.01016.48
7.3.00.0140.00516.70
7.2.330.0160.00616.87
7.2.320.0040.01516.71
7.2.310.0090.01216.48
7.2.300.0150.00816.74
7.2.290.0150.00616.72
7.2.130.0130.00916.96
7.2.120.0120.00916.84
7.2.110.0130.00616.79
7.2.100.0210.00716.91
7.2.90.0070.00916.93
7.2.80.0060.00616.72
7.2.70.0090.00817.02
7.2.60.0100.00817.01
7.2.50.0120.00416.77
7.2.40.0090.00616.76
7.2.30.0060.00816.80
7.2.20.0060.00716.91
7.2.10.0090.00616.70
7.2.00.0080.00617.56
7.1.250.0060.01015.91
7.1.200.0170.00715.80
7.1.100.0040.00718.37
7.1.70.0030.00617.15
7.1.60.0070.01019.44
7.1.50.0060.00617.09
7.1.00.0030.07722.38
7.0.200.0000.00916.90
7.0.100.0030.03320.16
7.0.90.0100.03319.87
7.0.80.0100.05019.87
7.0.70.0070.04319.96
7.0.60.0130.07019.92
7.0.50.0200.06720.18
7.0.40.0130.07020.19
7.0.30.0130.05720.00
7.0.20.0130.09320.07
7.0.10.0070.04720.06
7.0.00.0130.07320.12
5.6.280.0000.03321.03
5.6.250.0030.04320.63
5.6.240.0070.03720.66
5.6.230.0100.06320.75
5.6.220.0030.07320.56
5.6.210.0230.04020.57
5.6.200.0170.06721.04
5.6.190.0070.07720.92
5.6.180.0130.08021.05
5.6.170.0000.05321.08
5.6.160.0030.05020.94
5.6.150.0070.06021.12
5.6.140.0070.07320.99
5.6.130.0070.09020.95
5.6.120.0200.06021.08
5.6.110.0100.08021.07
5.6.100.0170.07321.16
5.6.90.0070.06021.09
5.6.80.0030.08020.45
5.6.70.0100.07020.39
5.6.60.0170.07320.38
5.6.50.0100.07720.43
5.6.40.0100.07020.46
5.6.30.0000.07720.54
5.6.20.0030.07720.31
5.6.10.0100.04020.43
5.6.00.0100.06320.43
5.5.380.0000.04320.37
5.5.370.0070.06720.38
5.5.360.0100.04020.34
5.5.350.0070.05320.47
5.5.340.0070.08320.89
5.5.330.0130.07320.89
5.5.320.0070.04720.64
5.5.310.0130.07320.88
5.5.300.0070.08020.89
5.5.290.0070.08020.87
5.5.280.0070.05320.90
5.5.270.0170.07720.85
5.5.260.0030.07020.86
5.5.250.0100.08020.54
5.5.240.0130.06720.27
5.5.230.0000.05020.17
5.5.220.0100.07720.02
5.5.210.0130.07720.27
5.5.200.0170.04020.06
5.5.190.0170.06720.23
5.5.180.0100.04020.23
5.5.160.0170.07020.14
5.5.150.0100.04320.22
5.5.140.0030.05720.07
5.5.130.0070.07320.08
5.5.120.0070.06320.25
5.5.110.0100.06720.24
5.5.100.0100.07320.08
5.5.90.0100.06720.15
5.5.80.0130.03020.09
5.5.70.0070.07720.05
5.5.60.0100.06020.16
5.5.50.0170.08020.03
5.5.40.0070.04320.11
5.5.30.0030.07720.03
5.5.20.0030.08720.15
5.5.10.0070.08019.98
5.5.00.0070.07319.98

preferences:
157.71 ms | 403 KiB | 5 Q