3v4l.org

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

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