3v4l.org

run code in 500+ PHP versions simultaneously
<?php const A = 1; function &foo(&$a) { return []; } $a = 1; $a = foo($a); // Notice: Only variable references should be returned by reference foo(1); // Fatal error: Uncaught Error: foo(): Argument #1 ($a) cannot be passed by reference ?>
Output for git.master_jit, git.master
Notice: Only variable references should be returned by reference in /in/6knLV on line 6 Fatal error: Uncaught Error: foo(): Argument #1 ($a) could not be passed by reference in /in/6knLV:13 Stack trace: #0 {main} thrown in /in/6knLV on line 13
Process exited with code 255.

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:
43.12 ms | 873 KiB | 4 Q