3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); $string = <<<'EOF' Bar <meta content="text/html; charset=unicode" http-equiv="Content-Type"> Foo EOF; libxml_use_internal_errors(true); $dom = new DOMDocument(); $dom->loadHTML($string); $f = $dom->saveHTML(); echo $f . PHP_EOL . PHP_EOL; $weirdStuff = preg_match('/>([\&\#a-zA-Z0-9\;]+)</', $f, $result); echo $result[1] . PHP_EOL . PHP_EOL; $utf8 = mb_convert_encoding($result[1], 'UTF-8', 'HTML-ENTITIES'); echo $utf8 . PHP_EOL . PHP_EOL; echo iconv('UTF-8', 'unicode', $utf8) . PHP_EOL . 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.5.00.0150.01221.00
8.4.150.0020.00114.05
8.4.140.0130.01218.77
8.4.130.0130.00819.07
8.4.120.0040.00521.68
8.4.110.0090.00819.54
8.4.100.0160.00519.59
8.4.90.0100.01021.34
8.4.80.0070.00219.70
8.4.70.0050.00419.75
8.4.60.0120.00819.65
8.4.50.0150.00619.67
8.4.40.0180.01220.66
8.4.30.0160.01319.17
8.4.20.0130.00320.77
8.4.10.0080.00824.98
8.3.280.0180.00619.45
8.3.270.0110.00917.86
8.3.260.0100.00917.63
8.3.250.0100.00920.06
8.3.240.0130.00717.71
8.3.230.0110.00917.44
8.3.220.0100.00819.65
8.3.210.0150.00517.71
8.3.200.0060.00317.66
8.3.190.0070.01121.66
8.3.180.0110.00919.73
8.3.170.0000.00817.95
8.3.160.0090.00918.23
8.3.150.0070.01317.74
8.3.140.0060.00321.75
8.3.130.0030.00619.40
8.3.120.0140.00019.59
8.3.110.0090.00320.94
8.3.100.0100.00024.06
8.3.90.0080.00326.77
8.3.80.0040.00417.63
8.3.70.0000.01518.00
8.3.60.0150.00717.50
8.3.50.0180.00721.23
8.3.40.0110.00421.52
8.3.30.0040.01220.09
8.3.20.0000.00824.18
8.3.10.0090.00024.66
8.3.00.0080.00026.16
8.2.290.0090.00521.07
8.2.280.0110.00719.52
8.2.270.0100.01019.46
8.2.260.0120.00017.55
8.2.250.0000.00817.73
8.2.240.0060.00319.84
8.2.230.0040.00422.58
8.2.220.0060.00337.54
8.2.210.0120.00326.77
8.2.200.0110.00017.63
8.2.190.0180.00417.47
8.2.180.0070.01025.92
8.2.170.0040.01120.08
8.2.160.0110.01122.96
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0060.00320.50
8.2.110.0190.00323.15
8.2.100.0160.00318.66
8.2.90.0070.00320.13
8.2.80.0000.01018.91
8.2.70.0030.00718.63
8.2.60.0050.00518.80
8.2.50.0050.00518.75
8.2.40.0050.00520.82
8.2.30.0030.00919.04
8.2.20.0070.00021.40
8.2.10.0000.00819.14
8.2.00.0050.00320.27
8.1.330.0170.00717.30
8.1.320.0060.00617.26
8.1.310.0090.00917.51
8.1.300.0080.00021.14
8.1.290.0100.00030.84
8.1.280.0070.00725.92
8.1.270.0030.00523.99
8.1.260.0030.00626.35
8.1.250.0050.00528.09
8.1.240.0110.00023.61
8.1.230.0100.00318.52
8.1.220.0100.00018.54
8.1.210.0050.00518.77
8.1.200.0080.00418.22
8.1.190.0100.00218.35
8.1.180.0100.00018.10
8.1.170.0000.00919.84
8.1.160.0090.00019.82
8.1.150.0000.00819.59
8.1.140.0070.00418.34
8.1.130.0040.00419.73
8.1.120.0050.00318.33
8.1.110.0000.00718.38
8.1.100.0060.00618.56
8.1.90.0040.00418.42
8.1.80.0000.00918.33
8.1.70.0000.00718.41
8.1.60.0120.00018.52
8.1.50.0040.00418.50
8.1.40.0130.00018.41
8.1.30.0120.00318.53
8.1.20.0100.00418.58
8.1.10.0070.00718.55
8.1.00.0050.00818.41
8.0.300.0000.01018.77
8.0.290.0000.01017.75
8.0.280.0090.00019.38
8.0.270.0090.00018.90
8.0.260.0060.00019.40
8.0.250.0070.00018.05
8.0.240.0040.00418.05
8.0.230.0000.00817.89
8.0.220.0030.00317.82
8.0.210.0040.00417.79
8.0.200.0090.00018.12
8.0.190.0140.00017.89
8.0.180.0040.00417.91
8.0.170.0140.00317.96
8.0.160.0150.00617.79
8.0.150.0140.00617.80
8.0.140.0170.00317.79
8.0.130.0140.00017.82
8.0.120.0180.00418.00
8.0.110.0250.00317.88
8.0.100.0240.00017.82
8.0.90.0040.00817.75
8.0.80.0190.00017.85
8.0.70.0200.00317.82
8.0.60.0180.00417.76
8.0.50.0190.00017.82
8.0.30.0170.00317.90
8.0.20.0100.00917.95
8.0.10.0090.00817.77
7.4.330.0050.00015.55
7.4.320.0000.00817.41
7.4.300.0080.00017.44
7.4.290.0050.00217.41
7.4.280.0130.00517.72
7.4.270.0180.00517.70
7.4.260.0110.01117.30
7.4.250.0230.00017.43
7.4.240.0230.00017.41
7.4.230.0190.00517.51
7.4.220.0160.00317.73
7.4.210.0140.00617.46
7.4.200.0140.00517.39
7.4.190.0170.00317.45
7.4.180.0160.00317.62
7.4.160.0100.00317.48
7.4.150.0140.00317.54
7.4.140.0190.00017.34
7.4.130.0180.00017.34
7.4.120.0110.00717.43
7.4.110.0140.00717.37
7.4.100.0130.00417.40
7.4.90.0110.00617.71
7.4.80.0130.00617.65
7.4.70.0110.00717.45
7.4.60.0140.00717.37
7.4.50.0190.00017.54
7.4.40.0070.00717.44
7.4.30.0080.00317.42
7.4.20.0000.00917.27
7.4.10.0100.00017.34
7.4.00.0080.00317.43

preferences:
34.48 ms | 403 KiB | 5 Q