3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '<img src="https://example.com/123456789/300.jpg?key=abcdefg" /> <img src="https://example.com/123456789/600.jpg?key=abcdefg" /> <img src="https://example.com/123456789/900.jpg?key=abcdefg" /> <img src="https://example.com/123456789/1200.jpg?key=abcdefg" />'; $dom = new DOMDocument; $dom->loadHTML($string); $images = $dom->getElementsByTagName('img'); foreach($images as $image) { echo $image->getAttribute('src') . PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
https://example.com/123456789/300.jpg?key=abcdefg https://example.com/123456789/600.jpg?key=abcdefg https://example.com/123456789/900.jpg?key=abcdefg https://example.com/123456789/1200.jpg?key=abcdefg

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
27.36 ms | 405 KiB | 5 Q