- Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.17
- Fatal error: Can't use method return value in write context in /in/bk3sr on line 5
Process exited with code 255.
<?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;
}
}