3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Person{ public $name; public $age; public function __construct($name,$age){ $this->name = $name; $this->age = $age; } public function personDetails(){ echo "Person nam is {$this->name} and person age is {$this->age}"; } } $personOne = new person("akbar","28"); $personOne->personDetails(); ?>
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.0
Person nam is akbar and person age is 28