3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { private $_property = "Foo"; public function get() { return $this->_property; } public function modifyProperty(Foo $other, $value) { $other->_property = $value; } } $foo = new Foo(); $bar = new Foo(); printf("bar _property: %s\n",$bar->get()); // prints: bar _property: Foo $foo->modifyProperty($bar, "Bar"); printf("bar _property: %s\n",$bar->get()); /
Output for 5.3.0 - 5.4.28
Parse error: syntax error, unexpected '/' in /in/MZVUK on line 22
Process exited with code 255.