Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Car {
- public $wheels = 4;
- function greeting(){
- return "Hello there";
- }
- }
- $bmw = new Car();
- class Trucks extends Car{
- }
- $volvo = new Trucks();
- echo $volvo->wheels;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement