3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = " <div id='div-gpt-ad-1456499310532-2' style='height:90px; width:970px;' style=\"height:90px; width:970px;\"> </div>"; // create a new DomDocument object $doc = new DOMDocument(); // load the HTML into the DomDocument object (this would be your source HTML) $doc->loadHTML($input); removeElementsByTagName('style', $doc); // output cleaned html echo $doc->saveHtml(); function removeElementsByTagName($tagName, $document) { $nodeList = $document->getElementsByTagName($tagName); for ($nodeIdx = $nodeList->length; --$nodeIdx >= 0; ) { $node = $nodeList->item($nodeIdx); $node->parentNode->removeChild($node); } }

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.0120.00316.88
8.3.50.0120.00316.63
8.3.40.0180.00019.09
8.3.30.0120.00319.27
8.3.20.0040.00419.20
8.3.10.0050.00321.95
8.3.00.0040.00421.09
8.2.180.0090.00625.92
8.2.170.0100.00319.16
8.2.160.0070.01422.96
8.2.150.0060.00325.66
8.2.140.0110.00424.66
8.2.130.0040.00421.55
8.2.120.0000.00726.35
8.2.110.0090.00019.58
8.2.100.0000.01218.16
8.2.90.0080.00018.09
8.2.80.0000.00817.97
8.2.70.0030.00617.88
8.2.60.0080.00018.30
8.2.50.0030.00718.07
8.2.40.0000.00818.41
8.2.30.0080.00018.30
8.2.20.0000.00817.98
8.2.10.0000.00718.23
8.2.00.0000.00718.42
8.1.280.0120.00925.92
8.1.270.0000.00824.66
8.1.260.0060.00328.09
8.1.250.0040.00428.09
8.1.240.0060.00322.61
8.1.230.0040.00821.28
8.1.220.0000.00818.13
8.1.210.0000.00918.95
8.1.200.0060.00317.48
8.1.190.0030.00617.35
8.1.180.0030.00518.10
8.1.170.0040.00418.72
8.1.160.0040.00419.13
8.1.150.0000.00719.09
8.1.140.0040.00419.89
8.1.130.0030.00317.85
8.1.120.0000.00717.68
8.1.110.0000.00717.61
8.1.100.0040.00417.58
8.1.90.0040.00417.66
8.1.80.0000.00717.65
8.1.70.0000.00717.60
8.1.60.0040.00417.89
8.1.50.0000.00817.73
8.1.40.0000.00817.84
8.1.30.0090.00017.88
8.1.20.0040.00417.82
8.1.10.0000.00717.72
8.1.00.0050.00317.83
8.0.300.0040.00420.14
8.0.290.0040.00417.13
8.0.280.0080.00018.80
8.0.270.0040.00417.55
8.0.260.0060.00317.54
8.0.250.0040.00417.24
8.0.240.0000.00717.20
8.0.230.0050.00317.17
8.0.220.0040.00317.06
8.0.210.0000.00717.17
8.0.200.0050.00317.11
8.0.190.0000.00717.22
8.0.180.0070.00017.09
8.0.170.0040.00417.09
8.0.160.0000.00717.09
8.0.150.0040.00416.97
8.0.140.0040.00417.05
8.0.130.0000.00513.62
8.0.120.0040.00417.04
8.0.110.0000.00817.08
8.0.100.0020.00516.94
8.0.90.0020.00517.30
8.0.80.0030.01217.19
8.0.70.0080.00016.95
8.0.60.0000.00817.25
8.0.50.0070.00017.06
8.0.30.0080.01117.51
8.0.20.0090.01117.53
8.0.10.0000.00717.09
8.0.00.0130.00817.08
7.4.330.0030.00315.08
7.4.320.0030.00316.73
7.4.300.0000.00616.86
7.4.290.0060.00316.76
7.4.280.0080.00016.77
7.4.270.0000.00716.77
7.4.260.0000.00716.59
7.4.250.0050.00316.83
7.4.240.0040.00416.77
7.4.230.0000.00817.00
7.4.220.0160.01016.89
7.4.210.0120.00316.72
7.4.200.0000.00716.93
7.4.160.0110.00616.70
7.4.150.0100.01017.40
7.4.140.0200.00017.86
7.4.130.0060.01316.75
7.4.120.0140.00316.62
7.4.110.0090.00916.67
7.4.100.0140.00316.89
7.4.90.0120.00416.67
7.4.80.0090.01219.39
7.4.70.0070.01016.57
7.4.60.0090.00916.73
7.4.50.0030.01316.87
7.4.40.0060.01116.63
7.4.30.0080.00816.65
7.4.00.0030.01015.29
7.3.330.0050.00013.50
7.3.320.0030.00513.44
7.3.310.0030.00316.45
7.3.300.0030.00316.47
7.3.290.0100.00716.61
7.3.280.0090.00816.61
7.3.270.0130.00617.40
7.3.260.0070.01016.67
7.3.250.0110.00816.63
7.3.240.0090.00916.66
7.3.230.0100.01016.53
7.3.210.0160.00616.81
7.3.200.0120.00516.79
7.3.190.0080.00816.64
7.3.180.0160.00016.59
7.3.170.0070.01316.81
7.3.160.0140.00716.43
7.3.10.0070.00716.58
7.3.00.0070.01016.86
7.2.330.0110.00616.53
7.2.320.0060.01217.11
7.2.310.0100.01016.90
7.2.300.0070.01816.82
7.2.290.0070.01017.03
7.2.130.0100.00617.15
7.2.120.0060.00916.70
7.2.110.0060.00617.18
7.2.100.0030.01316.96
7.2.90.0070.00317.19
7.2.80.0080.00416.79
7.2.70.0040.01116.96
7.2.60.0090.00517.03
7.2.50.0040.00816.70
7.2.40.0030.01317.11
7.2.30.0080.00816.91
7.2.20.0110.00616.95
7.2.10.0000.01217.23
7.2.00.0060.00916.93
7.1.250.0030.00616.01
7.1.200.0040.00715.77
7.1.70.0070.01317.43
7.1.60.0000.02620.41
7.1.00.0000.07722.50
7.0.200.0000.00916.99
7.0.60.0130.07721.79
7.0.50.0070.08017.97
7.0.40.0070.06720.27
7.0.30.0200.06320.46
7.0.20.0270.05320.40
7.0.10.0200.05720.39
7.0.00.0200.06020.45
5.6.280.0030.07320.99
5.6.210.0070.03720.70
5.6.200.0000.04318.27
5.6.190.0300.05321.20
5.6.180.0170.05721.22
5.6.170.0130.06721.13
5.6.160.0330.06021.25
5.6.150.0500.05321.22
5.6.140.0430.04721.25
5.6.130.0330.04721.11
5.6.120.0170.06321.19
5.6.110.0230.06321.16
5.6.100.0300.06321.17
5.6.90.0370.06321.18
5.6.80.0370.05320.61
5.6.70.0270.06720.57
5.6.60.0330.04720.38
5.6.50.0270.05720.64
5.6.40.0400.05320.52
5.6.30.0300.05020.48
5.6.20.0300.04020.53
5.6.10.0070.06020.51
5.6.00.0200.05020.43
5.5.350.0230.05720.41
5.5.340.0170.07018.07
5.5.330.0130.06021.05
5.5.320.0130.06020.98
5.5.310.0270.04720.96
5.5.300.0300.06021.06
5.5.290.0200.05021.06
5.5.280.0030.06720.92
5.5.270.0270.05721.09
5.5.260.0400.05020.95
5.5.250.0300.06720.73
5.5.240.0370.06020.45
5.5.230.0370.06020.48
5.5.220.0230.05720.29
5.5.210.0300.05020.32
5.5.200.0300.05020.43
5.5.190.0200.04720.43
5.5.180.0130.06020.30
5.5.160.0170.05020.30
5.5.150.0200.05020.29
5.5.140.0130.05720.23
5.5.130.0200.05020.41
5.5.120.0200.05020.41
5.5.110.0130.06020.27
5.5.100.0170.05720.21
5.5.90.0100.06320.23
5.5.80.0130.05720.22
5.5.70.0170.05020.30
5.5.60.0130.06720.20
5.5.50.0130.05320.19
5.5.40.0170.05320.19
5.5.30.0000.06720.18
5.5.20.0130.05720.19
5.5.10.0230.06320.19
5.5.00.0130.05720.17

preferences:
64.67 ms | 401 KiB | 5 Q