3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function &returnRef() { global $a; return $a; } function returnVal() { global $a; return $a; } $a = "original"; $b =& returnVal(); $b = "changed"; var_dump($a); //expecting warning + "original" $a = "original"; $b =& returnRef(); $b = "changed"; var_dump($a); //expecting "changed" $b =& @$a;
Output for 5.3.0 - 5.4.21
Parse error: syntax error, unexpected '@' in /in/0Notq on line 22
Process exited with code 255.