Advertisement
Guest User

Untitled

a guest
Apr 10th, 2013
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.20 KB | None | 0 0
  1. <?php
  2. class Car
  3. {
  4.     // property
  5.     public $Engine;
  6. }
  7.  
  8. class Engine
  9. {
  10.     // property
  11.     public $Horsepower;
  12. }
  13.  
  14. $myCar = new Car();
  15. $myCar->Engine = new Engine();
  16. $myCar->Engine->Horsepower = 160;
  17.  
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement