3v4l.org

run code in 300+ PHP versions simultaneously
<?php // start engines; for($i=0;$i++<2;)number_format(hrtime(true),5);test_1('hi');test_2('hi'); function test_1( $string ) {} function test_2( string $string ) {} $t = hrtime(true); for ( $i = 0; ++$i < 1e6; ) test_1( 'hi' ); echo 'untyped: ', $a=number_format( (hrtime(true)-$t)/1e9,5),"s\n"; $t = hrtime(true); for ( $i = 0; ++$i < 1e6; ) test_2( 'hi' ); echo 'typed: ', $b=number_format( (hrtime(true)-$t)/1e9,5),"s\n"; printf( 'Typed is %d%% slower.', (1-($a/$b))*100 );
Output for git.master_jit
untyped: 0.01368s typed: 0.01469s Typed is 6% slower.
Output for git.master
untyped: 0.01299s typed: 0.01384s Typed is 6% slower.
Output for rfc.property-hooks
untyped: 0.01843s typed: 0.01005s Typed is -83% slower.

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