3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = 'foo bar baz <img src="http://ak-hdl.buzzfed.com/static/2014-06/6/12/enhanced/webdr08/enhanced-21313-1402070821-11.jpg" width="500" height="1000"/> dragons and ponies.'; $dom = new \DOMDocument( '1.0' ); $dom->loadHTML( $content ); for ( $i = 0; $i < 1000; $i++ ) { // \DOMNodesList $nodes = $dom->getElementsByTagName( 'img' ); if ( $nodes->length ) { $img = $nodes->item(0); $src = $img->getAttribute( 'src' ); $width = $img->getAttribute( 'width' ); $height = $img->getAttribute( 'height' ); } }
Output for git.master_jit, git.master, rfc.property-hooks

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:
126.47 ms | 405 KiB | 5 Q