3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace std { function array_push(array &$array, mixed ...$values): int { foreach ($values as $value) $array[] = $value; return \count($array); } } namespace { $preflight = microtime(true); $foo = ['bar', 123, 'baz', true]; $start = microtime(true); var_dump(array_push($foo, 123, 'bzzz'), $foo); $end = microtime(true); printf("%0.6fs\n", $end - $start); $foo = ['bar', 123, 'baz', true]; $start = microtime(true); var_dump(std\array_push($foo, 123, 'bzzz'), $foo); $end = microtime(true); printf("%0.6fs\n", $end - $start); }
Output for git.master
int(6) array(6) { [0]=> string(3) "bar" [1]=> int(123) [2]=> string(3) "baz" [3]=> bool(true) [4]=> int(123) [5]=> string(4) "bzzz" } 0.000030s int(6) array(6) { [0]=> string(3) "bar" [1]=> int(123) [2]=> string(3) "baz" [3]=> bool(true) [4]=> int(123) [5]=> string(4) "bzzz" } 0.000024s

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:
31.65 ms | 401 KiB | 6 Q