3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function foo(array $input) { array_walk($input, array(__CLASS__, 'bar')); return $input; } protected static function bar(&$value) { ++$value; } } $a = range(10, 100, 10); $b = $a; echo join(', ', $a), "\n"; echo join(', ', A::foo($a)), "\n"; var_dump($b === $a);
Output for git.master, git.master_jit, rfc.property-hooks
10, 20, 30, 40, 50, 60, 70, 80, 90, 100 11, 21, 31, 41, 51, 61, 71, 81, 91, 101 bool(true)

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:
84.02 ms | 401 KiB | 8 Q