fork download
  1. <?php
  2. class Person{
  3. public $name;
  4. public $age;
  5.  
  6. function person(){
  7. $this->nmae = "Some Guy";
  8. $this->age = 22;
  9. }
  10.  
  11. function SayHello(){
  12. echo "Hi " . $this->name . " You are " . $this->age . "\n";
  13. }
  14. }
  15.  
  16. $person = new Person;
  17. $person->SayHello();
  18. var_dump($person);
  19.  
  20. // your code goes here
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
Hi  You are 22
object(Person)#1 (3) {
  ["name"]=>
  NULL
  ["age"]=>
  int(22)
  ["nmae"]=>
  string(8) "Some Guy"
}