3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <p><iframe allowfullscreen="" class="media-element file-default" data-fid="2219" data-media-element="1" frameborder="0" height="360" src="https://www.youtube.com/embed/sNEJOm4hSaw?feature=oembed" width="640"></iframe></p> HTML; $dom = new DOMDocument; $dom->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); foreach ($dom->getElementsByTagName('iframe') as $iframe) { $a = $dom->createElement('a'); $a->setAttribute('href', $iframe->getAttribute('src')); $a->nodeValue = "Link to youtube"; $iframe->parentNode->replaceChild($a, $iframe); } echo $dom->saveHTML();

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.0060.00918.80
8.3.50.0110.00917.79
8.3.40.0080.00819.03
8.3.30.0070.00719.04
8.3.20.0000.00721.98
8.3.10.0050.00319.39
8.3.00.0070.00022.20
8.2.180.0090.00616.63
8.2.170.0130.00622.96
8.2.160.0120.00322.28
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0080.00026.16
8.2.110.0000.00919.43
8.2.100.0080.00418.03
8.2.90.0040.00418.16
8.2.80.0090.00017.97
8.2.70.0000.00818.18
8.2.60.0060.00318.47
8.2.50.0080.00018.10
8.2.40.0000.00819.61
8.2.30.0020.00520.69
8.2.20.0000.00718.46
8.2.10.0070.00418.51
8.2.00.0050.00718.25
8.1.280.0090.00625.92
8.1.270.0070.01022.38
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00722.55
8.1.230.0110.00021.10
8.1.220.0040.00417.91
8.1.210.0030.00619.09
8.1.200.0030.00617.48
8.1.190.0080.00017.50
8.1.180.0100.00018.10
8.1.170.0050.00318.89
8.1.160.0070.00019.11
8.1.150.0040.00419.07
8.1.140.0070.00418.39
8.1.130.0100.00118.93
8.1.120.0070.00717.73
8.1.110.0080.00317.74
8.1.100.0060.00617.76
8.1.90.0080.00417.68
8.1.80.0110.00217.74
8.1.70.0080.00517.75
8.1.60.0050.00917.80
8.1.50.0100.00417.81
8.1.40.0080.00617.76
8.1.30.0080.00617.87
8.1.20.0110.00217.93
8.1.10.0090.00417.79
8.1.00.0090.00517.78
8.0.300.0040.00420.18
8.0.290.0040.00417.13
8.0.280.0000.00818.71
8.0.270.0080.00817.07
8.0.260.0080.00417.88
8.0.250.0060.00717.20
8.0.240.0080.00517.16
8.0.230.0060.00517.23
8.0.220.0070.00417.21
8.0.210.0070.00517.14
8.0.200.0080.00517.22
8.0.190.0050.00717.16
8.0.180.0030.00917.13
8.0.170.0080.00417.13
8.0.160.0070.00517.12
8.0.150.0070.00917.04
8.0.140.0060.00617.18
8.0.130.0060.00615.39
8.0.120.0090.00317.10
8.0.110.0070.00517.17
8.0.100.0080.00517.16
8.0.90.0030.00617.09
8.0.80.0060.00717.21
8.0.70.0060.00217.07
8.0.60.0020.00617.16
8.0.50.0030.00517.08
8.0.30.0070.00617.22
8.0.20.0120.00717.33
8.0.10.0070.00617.32
8.0.00.0100.00717.21
7.4.330.0030.00615.92
7.4.320.0080.00416.73
7.4.300.0130.00016.73
7.4.290.0050.00716.82
7.4.280.0070.00816.75
7.4.270.0060.00616.84
7.4.260.0000.01316.79
7.4.250.0090.00416.69
7.4.240.0090.00216.74
7.4.230.0070.00616.88
7.4.220.0090.00516.82
7.4.210.0070.00916.85
7.4.200.0040.00816.75
7.4.190.0170.00016.75
7.4.180.0130.00616.79
7.4.160.0150.00616.73
7.4.150.0160.00516.78
7.4.140.0090.00717.03
7.4.130.0080.00716.73
7.4.120.0090.00716.75
7.4.110.0100.00816.61
7.4.100.0150.00616.84
7.4.90.0080.00816.67
7.4.80.0080.01117.33
7.4.70.0130.00816.72
7.4.60.0090.01116.62
7.4.50.0090.01016.64
7.4.40.0070.00916.57
7.4.30.0070.00916.55
7.4.20.0130.01016.68
7.4.10.0090.00916.66
7.4.00.0080.00916.12
7.3.330.0110.00014.88
7.3.320.0070.00314.82
7.3.310.0070.00316.47
7.3.300.0040.00716.45
7.3.290.0110.00616.41
7.3.280.0080.00716.49
7.3.270.0120.00816.53
7.3.260.0110.00616.64
7.3.250.0080.00716.52
7.3.240.0100.00916.59
7.3.230.0110.00916.57
7.3.220.0130.00416.53
7.3.210.0060.01116.50
7.3.200.0120.00916.53
7.3.190.0110.00616.48
7.3.180.0120.00516.58
7.3.170.0100.01016.46
7.3.160.0100.00816.50
7.3.150.0150.00416.50
7.3.140.0170.00616.53
7.3.130.0140.00716.45
7.3.120.0110.00816.05
7.3.110.0120.00815.77
7.3.100.0100.00915.71
7.3.90.0110.00815.79
7.3.80.0090.00715.71
7.3.70.0090.00815.75
7.3.60.0070.00815.79
7.3.50.0070.00815.58
7.3.40.0090.00715.57
7.3.30.0100.00615.62
7.3.20.0110.00615.90
7.3.10.0090.00916.07
7.3.00.0110.00716.10
7.2.340.0140.00616.65
7.2.330.0090.01016.70
7.2.320.0130.00616.79
7.2.310.0160.00616.70
7.2.300.0120.00716.73
7.2.290.0130.00716.66
7.2.280.0140.00716.74
7.2.270.0110.00916.64
7.2.260.0080.01116.61
7.2.250.0140.00716.37
7.2.240.0150.00715.92
7.2.230.0120.00615.91
7.2.220.0110.00815.92
7.2.210.0110.00615.93
7.2.200.0130.00615.92
7.2.190.0130.00415.88
7.2.180.0080.00815.87
7.2.170.0090.00915.86
7.2.160.0080.00915.92
7.2.150.0120.00916.23
7.2.140.0140.00716.03
7.2.130.0160.00616.32
7.2.120.0230.00716.26
7.2.110.0100.00916.29
7.2.100.0090.00916.38
7.2.90.0130.00816.37
7.2.80.0130.00716.36
7.2.70.0110.00716.29
7.2.60.0130.00616.40
7.2.50.0120.00816.34
7.2.40.0110.00716.39
7.2.30.0120.00716.38
7.2.20.0130.00916.39
7.2.10.0120.00716.37
7.2.00.0110.00916.33
7.1.330.0120.00815.32
7.1.320.0150.00915.25
7.1.310.0120.00615.22
7.1.300.0080.01015.23
7.1.290.0090.00815.25
7.1.280.0120.00515.06
7.1.270.0100.00815.33
7.1.260.0110.00815.38
7.1.250.0090.00815.26
7.1.240.0170.00815.45
7.1.230.0110.00815.41
7.1.220.0220.00715.41
7.1.210.0130.00615.49
7.1.200.0150.00615.43
7.1.190.0180.00315.40
7.1.180.0170.00515.46
7.1.170.0130.00615.43
7.1.160.0150.00615.52
7.1.150.0130.00815.43
7.1.140.0110.00915.38
7.1.130.0140.00815.43
7.1.120.0160.00315.42
7.1.110.0180.00615.45
7.1.100.0150.00715.43
7.1.90.0170.01015.45
7.1.80.0220.00815.51
7.1.70.0150.00415.46
7.1.60.0150.00815.47
7.1.50.0150.00815.50
7.1.40.0140.00915.47
7.1.30.0120.00915.50
7.1.20.0180.00915.46
7.1.10.0190.01015.47
7.1.00.0140.00915.40

preferences:
57.72 ms | 401 KiB | 5 Q