3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startTime = microtime(true); for($i=0; $i<100000; $i++) { $foo = "foo"; $bar = "bar"; $baz = "baz"; $array = compact('foo','bar','baz'); } $endTime = microtime(true); $elapsed = $endTime - $startTime; echo "With compact : $elapsed seconds\n"; $startTime = microtime(true); for($i=0; $i<100000; $i++) { $array = [ 'foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz' ]; } $endTime = microtime(true); $elapsed = $endTime - $startTime; echo "Without compact time : $elapsed seconds\n";
Output for git.master
With compact : 0.0061428546905518 seconds Without compact time : 0.0004270076751709 seconds
Output for git.master_jit
With compact : 0.0075509548187256 seconds Without compact time : 0.00065207481384277 seconds
Output for rfc.property-hooks
With compact : 0.0057680606842041 seconds Without compact time : 0.0004880428314209 seconds

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:
19.97 ms | 407 KiB | 5 Q