3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { return 1234; } class Foo { public static function asdf() { return 1234; } } $iterations = 1000000; $process = foo(); $process = Foo::asdf(); // Old $a = microtime( true ); for ( $i = 0; $i < $iterations; $i++ ) { $process = foo(); } $b = microtime( true ); $delta1 = $b - $a; // New $x = microtime( true ); for ( $j = 0; $j < $iterations; $j++ ) { $process = Foo::asdf(); } $y = microtime( true ); $delta2 = $y - $x; $percentage = $delta2 / $delta1 * 100; if ( $delta2 < $delta1 ) { printf( 'static method is %.2f%% faster', $percentage ); } else { printf( 'function call is %.2f%% faster', $percentage ); }
Output for git.master_jit
function call is 117.17% faster
Output for git.master
function call is 138.89% faster

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