thorpedosg

Untitled

Jul 24th, 2018
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. class juan
  4. {
  5.     public $name;
  6.     private $something;
  7.    
  8.     public function Display4()
  9.     {
  10.         echo 4;
  11.     }
  12.    
  13.     public function DisplaySomething($val)
  14.     {
  15.         $this->something = $val;
  16.         return $this->something;
  17.     }
  18. }
  19.  
  20. $new = new juan();
  21.  
  22. echo $new->name;
  23. $new->name = "Rafael";
  24. $new->Display4();
  25. $new->name = "juan";
  26. echo $new->name;
  27. echo $new->DisplaySomething("LOL");
  28.  
  29. ?>
Add Comment
Please, Sign In to add comment