3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = new DOMDocument( '1.0', 'UTF-8' ); $doc->loadHTML( '<?xml encoding="utf-8" ?><p><p><p><p><p>five<p><p><p><p><p>ten' ); $body = $doc->documentElement->childNodes[0]; $start = hrtime( true ); for ( $i = 0; $i < 1_000_000; $i++ ) $dummy = $body->childNodes->item( 4 ); $stop = hrtime( true ); $seconds = ( $stop - $start ) / 1_000_000_000; echo "$seconds s" . PHP_EOL; $start = hrtime( true ); for ( $i = 0; $i < 1_000_000; $i++ ) $dummy = $body->childNodes[4]; $stop = hrtime( true ); $seconds = ( $stop - $start ) / 1_000_000_000; echo "$seconds s" . PHP_EOL;
Output for git.master_jit
0.059000688 s 0.08060291 s
Output for git.master
0.056368919 s 0.061725844 s

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:
30.03 ms | 406 KiB | 5 Q