3v4l.org

run code in 300+ PHP versions simultaneously
<?php function html_asciify(string $utf8String): string { $iterator = IntlBreakIterator::createCodePointInstance(); $iterator->setText($utf8String); $result = ''; foreach ($iterator as $pos) { if ($pos === 0) { continue; } $codePoint = $iterator->getLastCodePoint(); $result .= $codePoint <= 127 ? chr($codePoint) : '&#x' . dechex($codePoint) . ';'; } return $result; } $result = html_asciify("aaaååddd仕事bbbb\x80aaaa"); var_dump($result, html_entity_decode($result));

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.130.0090.01218.03
8.4.120.0110.00920.75
8.4.110.0060.00520.84
8.4.100.0100.00818.05
8.4.90.0140.00718.11
8.4.80.0090.01021.67
8.4.70.0120.00918.13
8.4.60.0050.00321.87
8.4.50.0050.00319.37
8.4.40.0120.00917.88
8.4.30.0090.00919.85
8.4.20.0060.00326.39
8.4.10.0160.00318.02
8.3.260.0140.00616.90
8.3.250.0120.00719.34
8.3.240.0110.00916.88
8.3.230.0150.00517.19
8.3.220.0120.00717.36
8.3.210.0120.00716.96
8.3.200.0120.00916.85
8.3.190.0090.00617.59
8.3.180.0120.00619.28
8.3.170.0160.00317.04
8.3.160.0090.00617.61
8.3.150.0170.00317.45
8.3.140.0060.00319.34
8.3.130.0120.00418.54
8.3.120.0030.00619.35
8.3.110.0120.00620.94
8.3.100.0100.00624.06
8.3.90.0090.00626.77
8.3.80.0060.00319.36
8.3.70.0090.00916.88
8.3.60.0040.01118.65
8.3.50.0040.00916.84
8.3.40.0120.00318.68
8.3.30.0100.00718.92
8.3.20.0060.00320.41
8.3.10.0070.00023.73
8.3.00.0030.00519.81
8.2.290.0120.00720.99
8.2.280.0090.00716.89
8.2.270.0150.00019.31
8.2.260.0030.01516.73
8.2.250.0040.00417.04
8.2.240.0040.00417.47
8.2.230.0060.00322.58
8.2.220.0060.00337.54
8.2.210.0060.00926.77
8.2.200.0110.00018.88
8.2.190.0130.00316.59
8.2.180.0070.01117.07
8.2.170.0110.00422.96
8.2.160.0100.00320.56
8.2.150.0090.00024.18
8.2.140.0000.00824.66
8.2.130.0050.00326.16
8.2.120.0050.00317.88
8.2.110.0000.00920.63
8.2.100.0120.00017.88
8.2.90.0000.00819.34
8.2.80.0030.00617.97
8.2.70.0000.01017.88
8.2.60.0000.01118.18
8.2.50.0060.00318.07
8.2.40.0050.00518.21
8.2.30.0060.00318.20
8.2.20.0000.00818.20
8.2.10.0020.00518.37
8.2.00.0000.00718.54
8.1.330.0100.01016.85
8.1.320.0080.00716.27
8.1.310.0130.00616.50
8.1.300.0030.00518.71
8.1.290.0040.00430.84
8.1.280.0130.00325.92
8.1.270.0040.00424.07
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0100.00024.07
8.1.230.0080.00422.93
8.1.220.0000.00817.79
8.1.210.0090.00018.77
8.1.200.0070.00317.61
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0080.00018.79
8.1.160.0040.00419.14
8.1.150.0070.00019.07
8.1.140.0040.00417.89
8.1.130.0000.00819.18
8.1.120.0000.00817.61
8.1.110.0040.00417.55
8.1.100.0040.00417.57
8.1.90.0080.00017.48
8.1.80.0030.00517.61
8.1.70.0040.00417.57
8.1.60.0030.00717.73
8.1.50.0040.00417.48
8.1.40.0030.00617.62
8.1.30.0000.00817.76
8.1.20.0060.00317.88
8.1.10.0040.00417.62
8.1.00.0080.00017.66
8.0.300.0040.00418.77
8.0.290.0030.00717.00
8.0.280.0000.00718.62
8.0.270.0030.00317.32
8.0.260.0000.00717.02
8.0.250.0050.00217.16
8.0.240.0040.00417.02
8.0.230.0030.00517.02
8.0.220.0000.01016.99
8.0.210.0070.00017.12
8.0.200.0000.00717.05
8.0.190.0050.00316.99
8.0.180.0040.00417.05
8.0.170.0090.00616.94
8.0.160.0040.00416.86
8.0.150.0000.00816.79
8.0.140.0040.00417.01
8.0.130.0060.00013.40
8.0.120.0090.00016.94
8.0.110.0040.00417.16
8.0.100.0050.00317.12
8.0.90.0000.00816.96
8.0.80.0150.00017.02
8.0.70.0070.00016.89
8.0.60.0040.00417.11
8.0.50.0040.00416.88
8.0.30.0160.00417.15
8.0.20.0140.00617.43
8.0.10.0000.00717.25
8.0.00.0140.00717.02
7.4.330.0020.00315.55
7.4.320.0070.00016.71
7.4.300.0060.00016.80
7.4.290.0000.00716.84
7.4.280.0040.00416.65
7.4.270.0070.00016.82
7.4.260.0000.00716.68
7.4.250.0000.00816.64
7.4.240.0040.00416.82
7.4.230.0000.00716.67
7.4.220.0070.00016.78
7.4.210.0100.00716.79
7.4.200.0030.00316.63
7.4.160.0080.00816.65
7.4.150.0120.00617.40
7.4.140.0100.00717.86
7.4.130.0000.01916.68
7.4.120.0120.00716.82
7.4.110.0030.01416.74
7.4.100.0060.01616.66
7.4.90.0110.00916.57
7.4.80.0070.01119.39
7.4.70.0070.01116.61
7.4.60.0100.00716.66
7.4.50.0030.01516.54
7.4.40.0030.01216.70
7.4.00.0040.01215.25
7.3.330.0050.00013.30
7.3.320.0030.00313.15
7.3.310.0040.00416.58
7.3.300.0070.00016.57
7.3.290.0060.01016.43
7.3.280.0140.00516.43
7.3.270.0100.01017.40
7.3.260.0110.01116.51
7.3.240.0110.00516.62
7.3.230.0120.00416.54
7.3.210.0030.01416.54
7.3.200.0030.01316.67
7.3.190.0090.00916.52
7.3.180.0110.01116.56
7.3.170.0070.00716.70
7.3.160.0130.00316.57
7.2.330.0100.00716.77
7.2.320.0090.00916.84
7.2.310.0040.01916.68
7.2.300.0130.00616.79
7.2.290.0030.01416.69
7.2.80.0080.00316.72
7.2.60.0100.00317.07
7.2.20.0120.01318.36
7.2.10.0090.01118.38
7.2.00.0090.01518.46
7.1.200.0040.00815.97
7.1.140.0140.01217.21
7.1.130.0120.00917.09
7.1.120.0110.01517.01
7.1.110.0100.00818.13
7.1.100.0140.01018.38
7.1.90.0070.01418.28
7.1.80.0080.01218.31
7.1.70.0090.00917.69
7.1.60.0300.02035.31
7.1.50.0320.01735.07
7.1.40.0300.01534.83
7.1.30.0310.01534.59
7.1.20.0250.01134.89
7.1.10.0060.01016.82
7.1.00.0110.01116.88

preferences:
28.17 ms | 403 KiB | 5 Q