3v4l.org

run code in 300+ PHP versions simultaneously
<?php //this code will append a &mobileapp to every https://example.com url and http://foobar.com url ob_start(); ?> <html> <head> </head> <body> <a href="http://foobar.com"> http://www.example.com/~hillybilly/foobar.php silly silly </body> </html> <?php $html = ob_get_clean(); $append = 'mobileapp'; $doc = new DOMDocument(); $doc->loadHTML($html); $xpath = new DOMXpath($doc); $elements = $xpath->query('//*[@href | @src | @action]'); if (!is_null($elements)) { foreach ($elements as $element) { switch ($element->nodeName) { case 'a': $element->setAttribute('href', $element->getAttribute('href') . '&' $append); } } } 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)
5.4.240.0080.04212.38
5.4.230.0070.04312.37
5.4.220.0070.04212.37
5.4.210.0080.03912.37
5.4.200.0070.03612.37
5.4.190.0080.03512.37
5.4.180.0070.03712.37
5.4.170.0090.03912.38
5.4.160.0040.03812.37
5.4.150.0050.03812.37
5.4.140.0080.03912.06
5.4.130.0040.03912.04
5.4.120.0040.04312.00
5.4.110.0030.04012.00
5.4.100.0060.03512.00
5.4.90.0070.03812.00
5.4.80.0090.04312.00
5.4.70.0070.04311.99
5.4.60.0050.04211.99
5.4.50.0060.03912.00
5.4.40.0050.03611.98
5.4.30.0070.03511.98
5.4.20.0050.03611.98
5.4.10.0070.03311.98
5.4.00.0050.03611.47
5.3.280.0080.03912.71
5.3.270.0110.03912.72
5.3.260.0090.03812.72
5.3.250.0070.04012.72
5.3.240.0040.04112.72
5.3.230.0080.03712.71
5.3.220.0080.03612.68
5.3.210.0060.03912.68
5.3.200.0060.03612.68
5.3.190.0040.03812.68
5.3.180.0100.03412.67
5.3.170.0080.03812.67
5.3.160.0060.04012.67
5.3.150.0050.03712.67
5.3.140.0050.03612.66
5.3.130.0070.03712.66
5.3.120.0070.03812.66
5.3.110.0060.03812.66
5.3.100.0070.03912.12
5.3.90.0060.03912.08
5.3.80.0070.03612.08
5.3.70.0050.03612.07
5.3.60.0030.03812.06
5.3.50.0040.03812.00
5.3.40.0090.03812.00
5.3.30.0070.03611.95
5.3.20.0050.03611.72
5.3.10.0050.03611.68
5.3.00.0070.03511.66

preferences:
139.83 ms | 1386 KiB | 7 Q