Paste Search Dynamic
person
  1. <?php
  2.  
  3. class Person
  4. {
  5.     public $name;
  6.     public $age;
  7.  
  8.     public function __construct($name, $age)
  9.     {
  10.         $this->name = $name;
  11.         $this->age = $age;
  12.     }
  13. }
  14.  
  15. $person = new Person("John", 22);
  16. echo $person->name . ' ' . $person->age;
  17.  
  18.  ?>
Parsed in 0.006 seconds