3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inbox_message = '<p> Keep This</p><img src="http://example.com/someimage1.jpeg"><img src="http://example.com/someimage2.jpeg"><img src="http://example.com/someimage3.jpeg"><img src="http://example.com/someimage4.jpeg"><h1>Fake element</h1><img style="OVERFLOW: hidden; WIDTH: 0px; MAX-HEIGHT: 0px" alt="" src="http://test.mydomain.com/project433q325/track/Images/signature.gif?id=446&amp;etc=1586624376">'; $doc = new DOMDocument(); $doc->loadHTML($inbox_message); $imgs = $doc->getElementsByTagName('img'); for($i = $imgs->length; --$i >= 0;){ $node = $imgs->item($i); if (strpos($node->getAttribute('src'), 'http://test.mydomain.com/project433q325/track/Images/signature.gif?') !== false) { $node->parentNode->removeChild($node); } } echo $doc->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.4.140.0130.00917.62
8.4.130.0140.00717.71
8.4.120.0100.01224.41
8.4.110.0130.00819.05
8.4.100.0110.01017.84
8.4.90.0100.01117.90
8.4.80.0030.00617.99
8.4.70.0100.00619.77
8.4.60.0140.00818.07
8.4.50.0150.00618.90
8.4.40.0170.00319.55
8.4.30.0130.00718.93
8.4.20.0130.00718.28
8.4.10.0060.00319.66
8.3.270.0100.01016.82
8.3.260.0110.00816.96
8.3.250.0040.00616.67
8.3.240.0100.00917.13
8.3.230.0080.01116.66
8.3.220.0110.00717.52
8.3.210.0130.00716.88
8.3.200.0090.01016.95
8.3.190.0100.00917.35
8.3.180.0050.00519.16
8.3.170.0050.00317.56
8.3.160.0130.00618.59
8.3.150.0120.00016.72
8.3.140.0040.01420.77
8.3.130.0040.01218.43
8.3.120.0000.00819.07
8.3.110.0060.00620.94
8.3.100.0000.01016.60
8.3.90.0100.01018.20
8.3.80.0060.00316.88
8.3.70.0040.01116.63
8.3.60.0030.01318.43
8.3.50.0080.01024.74
8.3.40.0030.01718.91
8.3.30.0160.00318.96
8.3.20.0050.00322.07
8.3.10.0050.00322.34
8.3.00.0080.00023.61
8.2.290.0090.01020.91
8.2.280.0140.00516.57
8.2.270.0120.00316.75
8.2.260.0030.00517.33
8.2.250.0080.00016.98
8.2.240.0030.00617.53
8.2.230.0080.00422.58
8.2.220.0030.00724.06
8.2.210.0080.00026.77
8.2.200.0060.00317.13
8.2.190.0120.00318.66
8.2.180.0090.00618.79
8.2.170.0110.00719.19
8.2.160.0150.00422.96
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0000.00820.95
8.2.110.0000.00821.12
8.2.100.0080.00417.84
8.2.90.0090.00017.88
8.2.80.0030.00919.04
8.2.70.0040.00417.75
8.2.60.0030.00518.18
8.2.50.0000.00918.04
8.2.40.0080.00018.47
8.2.30.0000.00819.94
8.2.20.0070.00018.45
8.2.10.0060.00319.56
8.2.00.0040.00419.60
8.1.330.0100.01022.26
8.1.320.0100.00916.71
8.1.310.0070.01017.04
8.1.300.0030.00616.93
8.1.290.0070.00318.88
8.1.280.0150.00325.92
8.1.270.0060.00320.69
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0000.01019.50
8.1.230.0080.00322.91
8.1.220.0050.00318.02
8.1.210.0070.00418.77
8.1.200.0090.00017.48
8.1.190.0030.00517.25
8.1.180.0040.00418.98
8.1.170.0080.00017.72
8.1.160.0020.00519.04
8.1.150.0000.00719.13
8.1.140.0040.00419.08
8.1.130.0030.00320.34
8.1.120.0040.00417.68
8.1.110.0030.00617.60
8.1.100.0080.00017.70
8.1.90.0050.00217.67
8.1.80.0040.00417.70
8.1.70.0040.00417.69
8.1.60.0100.00017.79
8.1.50.0040.00417.64
8.1.40.0080.00017.70
8.1.30.0040.00417.80
8.1.20.0030.00517.93
8.1.10.0030.00517.88
8.1.00.0070.00417.70
8.0.300.0000.00818.77
8.0.290.0000.00817.13
8.0.280.0000.00718.73
8.0.270.0030.00318.30
8.0.260.0000.00618.77
8.0.250.0040.00417.23
8.0.240.0050.00317.24
8.0.230.0040.00417.08
8.0.220.0050.00217.04
8.0.210.0000.00817.15
8.0.200.0060.00017.07
8.0.190.0050.00317.18
8.0.180.0000.00817.04
8.0.170.0030.00617.18
8.0.160.0000.00817.14
8.0.150.0070.00017.04
8.0.140.0030.00616.94
8.0.130.0000.00513.53
8.0.120.0030.00517.02
8.0.110.0040.00417.15
8.0.100.0040.00416.96
8.0.90.0050.00516.99
8.0.80.0130.00717.10
8.0.70.0080.00016.95
8.0.60.0060.00316.98
8.0.50.0030.00616.93
8.0.30.0150.00917.28
8.0.20.0090.00917.59
8.0.10.0040.00416.96
8.0.00.0070.01116.94
7.4.330.0020.00215.55
7.4.320.0030.00316.89
7.4.300.0030.00316.66
7.4.290.0020.00516.72
7.4.280.0000.00716.75
7.4.270.0040.00416.70
7.4.260.0000.00513.52
7.4.250.0030.00316.85
7.4.240.0050.00216.71
7.4.230.0000.00716.55
7.4.220.0030.00316.69
7.4.210.0090.00816.81
7.4.200.0030.00516.90
7.4.130.0080.01017.01
7.4.120.0080.01116.93
7.4.110.0070.01016.58
7.4.100.0040.01416.86
7.4.90.0070.01016.84
7.4.80.0090.01219.39
7.4.70.0120.00916.66
7.4.60.0110.00416.92
7.4.50.0080.00816.74
7.4.40.0130.00616.73
7.4.30.0040.01216.55
7.4.20.0070.01016.82
7.4.10.0060.00916.77
7.4.00.0100.00616.59
7.3.330.0040.00416.34
7.3.320.0060.00013.21
7.3.310.0020.00516.36
7.3.300.0020.00516.47
7.3.290.0060.00916.48
7.3.260.0070.01116.50
7.3.240.0130.00516.64
7.3.230.0030.01616.70
7.3.210.0150.00416.69
7.3.200.0110.01116.46
7.3.190.0120.00616.76
7.3.180.0070.01016.46
7.3.170.0110.00616.64
7.3.160.0120.00316.37
7.3.150.0040.01216.51
7.3.140.0120.00616.70
7.3.130.0060.01216.76
7.3.120.0100.00616.83
7.3.110.0110.00416.53
7.3.100.0090.00616.59
7.3.90.0030.01216.61
7.3.80.0120.00416.61
7.3.70.0080.00816.42
7.3.60.0090.00616.68
7.3.50.0160.00016.50
7.3.40.0080.00816.59
7.3.30.0100.00716.41
7.3.20.0100.00716.42
7.3.10.0070.01016.53
7.3.00.0100.00616.48
7.2.330.0090.01216.74
7.2.320.0060.01216.64
7.2.310.0130.00316.98
7.2.300.0080.00816.81
7.2.290.0100.00616.99
7.2.280.0130.00316.99
7.2.270.0060.00916.98
7.2.260.0100.00716.71
7.2.250.0130.00416.75
7.2.240.0100.00716.61
7.2.230.0060.00916.80
7.2.220.0100.00616.79
7.2.210.0100.00616.67
7.2.200.0120.00316.71
7.2.190.0060.01016.61
7.2.180.0120.01216.87
7.2.170.0090.00916.90
7.2.160.0100.00616.71
7.2.150.0080.00916.98
7.2.140.0090.00916.77
7.2.130.0000.01716.89
7.2.120.0070.01016.83
7.2.110.0080.00816.96
7.2.100.0030.01316.86
7.2.90.0060.00916.76
7.2.80.0030.01216.86
7.2.70.0070.01017.02
7.2.60.0000.01816.84
7.2.50.0140.00416.76
7.2.40.0350.00617.01
7.2.30.0070.01017.07
7.2.20.0110.00516.91
7.2.10.0030.01416.87
7.2.00.0080.00816.83

preferences:
31.55 ms | 403 KiB | 5 Q