3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php //Enter your code here, enjoy! class Cat { public $isAlive = true; public $numLegs = 4; public $name; public function __construct($name) { return $this->name=$name; } public function meow() { return "Meow meow"; } } $name = new Cat("Cat Code"); echo $name->name; echo " / "; echo $name->meow();
based on PBdMO
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc6
Cat Code / Meow meow