3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "don&#39;t-break-me-überÆØÅ!"; print htmlspecialchars_decode($str, ENT_QUOTES) . PHP_EOL; print html_entity_decode($str, ENT_QUOTES) . PHP_EOL; print html_entity_decode($str, ENT_QUOTES, 'ISO-8859-1') . PHP_EOL; print html_entity_decode($str, ENT_QUOTES | ENT_XML1, 'ISO-8859-1') . PHP_EOL; print html_entity_decode($str, ENT_QUOTES, 'UTF-8') . PHP_EOL; // Decode ALL entities (double quotes (&#34;), // single quotes (&#39; + &apos;) and non printable chars (e.g. &#13;)) print html_entity_decode($str, ENT_QUOTES | ENT_XML1, 'UTF-8') . PHP_EOL; // Convert &#[0-9]+ entities to UTF-8 $new = preg_replace_callback("/(&#[0-9]+;)/", function($m) { return mb_convert_encoding($m[1], "UTF-8", "HTML-ENTITIES"); }, $str); print $new . PHP_EOL; // Convert &#[0-9]+ entities to ISO-8859-1 $new2 = preg_replace_callback("/(&#[0-9]+;)/", function($m) { return mb_convert_encoding($m[1], "ISO-8859-1", "HTML-ENTITIES"); }, $str); print $new2 . 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.3.40.0100.01019.00
8.3.30.0120.00318.71
8.3.20.0030.00523.66
8.3.10.0040.00421.95
8.3.00.0070.00021.97
8.2.170.0110.00722.96
8.2.160.0100.00322.51
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0030.00619.89
8.2.120.0070.00026.35
8.2.110.0070.00321.44
8.2.100.0040.00718.09
8.2.90.0000.00819.48
8.2.80.0050.00318.00
8.2.70.0040.00418.13
8.2.60.0080.00018.18
8.2.50.0000.00918.10
8.2.40.0080.00020.57
8.2.30.0030.00619.49
8.2.20.0040.00418.35
8.2.10.0000.00818.34
8.2.00.0040.00418.10
8.1.270.0080.00023.99
8.1.260.0050.00326.35
8.1.250.0000.01128.09
8.1.240.0000.00923.97
8.1.230.0060.00622.83
8.1.220.0000.00817.78
8.1.210.0060.00318.77
8.1.200.0070.00317.85
8.1.190.0080.00017.72
8.1.180.0050.00518.10
8.1.170.0090.00018.79
8.1.160.0000.00719.10
8.1.150.0000.00722.20
8.1.140.0050.00219.87
8.1.130.0000.00719.05
8.1.120.0000.00717.83
8.1.110.0040.00417.81
8.1.100.0020.00517.83
8.1.90.0070.00017.80
8.1.80.0000.00717.68
8.1.70.0050.00317.71
8.1.60.0000.00717.87
8.1.50.0060.00317.92
8.1.40.0040.00417.91
8.1.30.0040.00418.01
8.1.20.0080.00018.05
8.1.10.0070.00017.89
8.1.00.0040.00417.86
8.0.300.0040.00418.77
8.0.290.0040.00417.00
8.0.280.0030.00518.65
8.0.270.0030.00317.43
8.0.260.0030.00317.34
8.0.250.0030.00317.11
8.0.240.0050.00317.21
8.0.230.0040.00317.13
8.0.220.0030.00317.05
8.0.210.0080.00017.18
8.0.200.0000.00617.21
8.0.190.0040.00417.30
8.0.180.0040.00417.05
8.0.170.0080.00017.13
8.0.160.0000.00717.06
8.0.150.0070.00317.18
8.0.140.0040.00417.19
8.0.130.0030.00313.59
8.0.120.0080.00017.12
8.0.110.0030.00517.29
8.0.100.0050.00217.28
8.0.90.0030.00517.07
8.0.80.0040.01117.20
8.0.70.0080.00017.18
8.0.60.0040.00417.24
8.0.50.0000.00816.95
8.0.30.0080.01117.44
8.0.20.0100.00917.41
8.0.10.0000.00817.04
8.0.00.0130.01016.80
7.4.330.0000.00515.55
7.4.320.0000.00616.94
7.4.300.0000.00716.70
7.4.290.0050.00316.85
7.4.280.0020.00516.77
7.4.270.0000.00816.78
7.4.260.0000.00716.82
7.4.250.0000.00716.82
7.4.240.0070.00016.78
7.4.230.0000.00717.00
7.4.220.0060.01316.88
7.4.210.0060.01316.98
7.4.200.0030.00316.66
7.4.160.0100.00716.86
7.4.150.0170.00017.40
7.4.140.0110.01417.86
7.4.130.0070.01016.68
7.4.120.0060.01216.78
7.4.110.0170.00716.80
7.4.100.0090.01216.81
7.4.90.0060.01216.82
7.4.80.0130.01019.39
7.4.70.0030.01416.85
7.4.60.0080.00816.90
7.4.50.0030.01216.59
7.4.40.0030.01716.78
7.4.30.0120.00916.67
7.4.00.0040.01115.16
7.3.330.0070.00013.62
7.3.320.0000.00513.50
7.3.310.0000.00716.66
7.3.300.0030.00316.65
7.3.290.0090.00716.58
7.3.280.0090.01016.61
7.3.270.0130.00617.40
7.3.260.0110.00616.80
7.3.250.0120.00816.79
7.3.240.0110.00816.77
7.3.230.0090.00916.79
7.3.210.0100.01316.85
7.3.200.0140.00316.84
7.3.190.0000.01616.79
7.3.180.0120.00316.63
7.3.170.0150.00316.94
7.3.160.0150.00316.89
7.2.330.0090.00916.99
7.2.320.0000.01917.01
7.2.310.0120.00416.90
7.2.300.0060.01216.96
7.2.290.0080.00817.05
7.2.60.0110.00417.29
7.2.00.0030.00920.00
7.1.200.0060.00616.17
7.1.100.0000.01118.23
7.1.70.0170.00017.40
7.1.60.0310.00815.55
7.1.50.0110.01117.24
7.1.10.0170.05322.31
7.1.00.0070.06022.29
7.0.200.0060.00916.83
7.0.150.0070.06021.88
7.0.140.0000.06721.80
7.0.130.0130.05321.78
7.0.120.0130.05021.76
7.0.110.0130.05321.87
7.0.100.0100.05321.81
7.0.90.0100.06021.80
7.0.80.0170.05022.00
7.0.70.0100.05721.80
7.0.60.0200.04721.57
7.0.50.0170.05021.89
7.0.40.0070.05721.81
7.0.30.0200.04321.87
7.0.20.0070.05721.81
7.0.10.0200.04721.86
7.0.00.0170.05021.70

preferences:
60.59 ms | 400 KiB | 5 Q