3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function byRef(&$val) { $val = 'replaced'; } } $f = new Foo(); $var = ['original']; array_map($f->byRef(...), $var); print_r($var);
Output for git.master_jit, git.master
Warning: Foo::byRef(): Argument #1 ($val) must be passed by reference, value given in /in/b1KoE on line 9 Array ( [0] => original )

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:
45.31 ms | 712 KiB | 4 Q