3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $myInstance = new MyClass('ciao'); $res = $myInstance->doSomething($myInstance->getName()); print($res . ' ' . &$myInstance->getName()); class MyClass { private $_name; public function setName($name) { $this->_name = $name; } public function getName() { return $this->_name; } public function __construct($name) { $this->_name = $name; } public function doSomething($value) { $value = $value . '_MODIFIED'; return $value; } }
Output for 5.3.0 - 5.4.17
Parse error: syntax error, unexpected '&' in /in/O3g5R on line 8
Process exited with code 255.