3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class dog { public $name = ''; public function setName($name) { $this->name = $name; } public function getName() { return $this->name; } } $rover = new dog(); $rover->name = 'rover'; echo $rover->name;
Output for 5.6.38 - 7.3.0
rover