3v4l.org

run code in 300+ PHP versions simultaneously
function foo($in = false) {} function test($in) { $start = microtime(true); for ($i = 0; $i < 10000; $i++) { foo(!!$in); } echo ((microtime(true) - $start) / 1000)."\n"; } function test2($in) { $start = microtime(true); for ($i = 0; $i < 10000; $i++) { foo((boolean)$in); } echo ((microtime(true) - $start) / 1000)."\n"; } test($tmp); test2($tmp); echo "\n"; $tmp = false; test($tmp); test2($tmp); echo "\n"; $tmp = '0'; test($tmp); test2($tmp); <?php
Output for git.master, git.master_jit, rfc.property-hooks
function foo($in = false) {} function test($in) { $start = microtime(true); for ($i = 0; $i < 10000; $i++) { foo(!!$in); } echo ((microtime(true) - $start) / 1000)."\n"; } function test2($in) { $start = microtime(true); for ($i = 0; $i < 10000; $i++) { foo((boolean)$in); } echo ((microtime(true) - $start) / 1000)."\n"; } test($tmp); test2($tmp); echo "\n"; $tmp = false; test($tmp); test2($tmp); echo "\n"; $tmp = '0'; test($tmp); test2($tmp);

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:
37.62 ms | 402 KiB | 8 Q