3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <a name="file_type_definition"></a>file_type_definition ::= <font color=#a08000><strong>FILE<span>other stuff</span></strong></font> <font color=#a08000><strong>OF</strong></font> <a href="#type_mark">type_mark</a> HTML; $dom = new DOMDocument(); $dom->loadHTML($html); $xpath = new DOMXPath($dom); foreach($xpath->query('//strong') as $strong) { $strong->parentNode->replaceChild(new DOMText(sprintf("'%s'", $strong->textContent)),$strong); } var_dump($dom->textContent);

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.60.0170.00316.88
8.3.50.0120.00722.23
8.3.40.0090.00919.15
8.3.30.0070.00718.87
8.3.20.0080.00019.42
8.3.10.0040.00422.20
8.3.00.0040.00420.06
8.2.180.0150.00317.13
8.2.170.0110.00422.96
8.2.160.0030.01020.52
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00421.50
8.2.110.0000.00919.82
8.2.100.0060.00618.30
8.2.90.0030.00619.65
8.2.80.0040.00417.97
8.2.70.0050.00318.00
8.2.60.0030.00618.30
8.2.50.0060.00318.10
8.2.40.0000.00822.67
8.2.30.0040.00419.69
8.2.20.0040.00418.09
8.2.10.0070.00018.44
8.2.00.0060.00318.50
8.1.280.0090.00925.92
8.1.270.0060.00324.29
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00422.55
8.1.230.0030.00817.89
8.1.220.0040.00418.05
8.1.210.0040.00418.77
8.1.200.0030.00617.73
8.1.190.0040.00417.60
8.1.180.0050.00518.10
8.1.170.0000.00818.92
8.1.160.0080.00019.46
8.1.150.0030.00519.19
8.1.140.0060.00319.92
8.1.130.0040.00418.06
8.1.120.0030.00717.94
8.1.110.0060.00317.73
8.1.100.0000.00717.89
8.1.90.0030.00617.88
8.1.80.0040.00417.83
8.1.70.0070.00017.84
8.1.60.0050.00318.03
8.1.50.0030.00517.84
8.1.40.0080.00017.93
8.1.30.0060.00318.09
8.1.20.0000.00817.90
8.1.10.0040.00417.99
8.1.00.0110.00017.92
8.0.300.0070.00018.77
8.0.290.0000.00816.86
8.0.280.0000.00718.78
8.0.270.0040.00417.35
8.0.260.0060.00017.54
8.0.250.0070.00017.41
8.0.240.0000.00717.30
8.0.230.0030.00317.41
8.0.220.0040.00417.19
8.0.210.0030.00317.24
8.0.200.0030.00317.30
8.0.190.0090.00017.43
8.0.180.0000.00817.38
8.0.170.0000.00717.39
8.0.160.0040.00417.38
8.0.150.0030.00317.35
8.0.140.0030.00417.33
8.0.130.0060.00013.71
8.0.120.0040.00417.14
8.0.110.0000.00817.15
8.0.100.0080.00017.30
8.0.90.0070.00017.03
8.0.80.0070.01017.30
8.0.70.0000.00717.14
8.0.60.0000.00817.22
8.0.50.0050.00217.46
8.0.30.0140.00417.49
8.0.20.0130.01017.52
8.0.10.0070.00017.38
8.0.00.0060.01216.86
7.4.330.0000.00615.08
7.4.320.0080.00016.93
7.4.300.0000.00617.03
7.4.290.0070.00017.06
7.4.280.0030.00616.82
7.4.270.0030.00316.98
7.4.260.0000.00816.93
7.4.250.0000.00716.96
7.4.240.0000.00717.00
7.4.230.0070.00016.89
7.4.220.0090.00916.94
7.4.210.0080.00816.94
7.4.200.0070.00017.03
7.4.160.0120.00616.86
7.4.150.0120.01217.40
7.4.140.0100.01017.86
7.4.130.0070.01016.83
7.4.120.0120.00916.90
7.4.110.0130.00416.84
7.4.100.0090.00916.99
7.4.90.0170.00016.68
7.4.80.0030.02019.39
7.4.70.0040.01216.96
7.4.60.0030.01316.91
7.4.50.0070.00416.96
7.4.40.0030.01716.96
7.4.30.0090.00716.65
7.4.00.0100.00615.08
7.3.330.0070.00013.32
7.3.320.0000.00513.32
7.3.310.0070.00016.60
7.3.300.0070.00016.63
7.3.290.0070.00016.59
7.3.280.0110.00816.67
7.3.270.0100.01417.40
7.3.260.0080.01016.76
7.3.250.0090.00816.71
7.3.240.0110.01016.78
7.3.230.0110.00716.57
7.3.210.0120.00616.65
7.3.200.0070.01416.87
7.3.190.0070.01016.69
7.3.180.0070.01416.80
7.3.170.0130.00916.68
7.3.160.0170.00016.79
7.3.10.0040.01016.70
7.3.00.0120.00316.59
7.2.330.0070.01116.86
7.2.320.0070.01717.16
7.2.310.0070.01116.88
7.2.300.0140.00717.14
7.2.290.0030.01316.81
7.2.130.0030.00917.03
7.2.120.0080.00317.18
7.2.110.0130.00017.21
7.2.100.0040.00816.91
7.2.90.0040.01217.35
7.2.80.0110.00316.94
7.2.70.0060.00617.12
7.2.60.0090.00617.11
7.2.50.0130.00016.94
7.2.40.0090.00016.96
7.2.30.0000.01416.89
7.2.20.0060.00617.14
7.2.10.0060.00317.13
7.2.00.0080.00618.13
7.1.250.0070.00715.95
7.1.200.0060.00915.81
7.1.100.0040.00718.30
7.1.70.0030.00617.22
7.1.60.0060.01619.47
7.1.00.0000.08022.69
7.0.200.0260.00314.98
7.0.60.0670.00020.11
7.0.50.0770.00020.50
7.0.40.0830.00020.47
7.0.30.0830.00020.45
7.0.20.0800.00020.44
7.0.10.0870.00020.48
7.0.00.0830.00020.41
5.6.280.0030.07321.05
5.6.210.0730.00020.75
5.6.200.0830.00021.33
5.6.190.0770.00021.26
5.6.180.0830.00021.26
5.6.170.0870.00021.30
5.6.160.0900.00021.33
5.6.150.0800.00021.22
5.6.140.0870.00021.25
5.6.130.0970.00021.32
5.6.120.0830.00021.33
5.6.110.0870.00021.20
5.6.100.1000.00021.24
5.6.90.0870.00021.30
5.6.80.0770.00020.67
5.6.70.0800.00020.63
5.6.60.0870.00020.60
5.6.50.1000.00020.54
5.6.40.1100.00020.66
5.6.30.1130.00020.60
5.6.20.0900.00020.56
5.6.10.0770.00020.55
5.6.00.0800.00020.58
5.5.350.0730.00020.54
5.5.340.0670.00020.95
5.5.330.0800.00020.96
5.5.320.0830.00020.98
5.5.310.0770.00020.95
5.5.300.0930.00020.98
5.5.290.1100.00021.07
5.5.280.0770.00021.11
5.5.270.0930.00021.00
5.5.260.0800.00020.95
5.5.250.0770.00020.79
5.5.240.0770.00020.51
5.5.230.0970.00020.41
5.5.220.0870.00020.52
5.5.210.0970.00020.33
5.5.200.0870.00020.30
5.5.190.0830.00020.34
5.5.180.0870.00020.31
5.5.160.0900.00020.52
5.5.150.0830.00020.30
5.5.140.1000.00020.48
5.5.130.0830.00020.33
5.5.120.0770.00020.46
5.5.110.0730.00020.46
5.5.100.0870.00020.39
5.5.90.0770.00020.31
5.5.80.0930.00020.25
5.5.70.0770.00020.21
5.5.60.0870.00020.38
5.5.50.0830.00020.24
5.5.40.0770.00020.22
5.5.30.0730.00020.24
5.5.20.0800.00020.27
5.5.10.1000.00020.23
5.5.00.0970.00020.24

preferences:
47.6 ms | 401 KiB | 5 Q