Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

Calling an Overridden Function

Tue Oct 28, 2008 1:46 pm

Code:

<?php
  
class vehicle {
     var
$brand_name;
     var
$number_of_wheels;
     var
$seating_capacity;

     function
message() {
         echo
"the vehicle class!";
     }
  }

  class
car extends vehicle {
     var
$doors;
     var
$rooftype;
     var
$powersteering;
     var
$powerwindows;

     function
message() {
       echo
"the car class.", " \n";
       
vehicle::message();
     }
  }

  
$merk= new car;
  
$merk->message();
?>




Post a reply
  Related Posts  to : Calling an Overridden Function
 Calling an Overridden Method in php     -  
 Calling a local variable from a static function     -  
 Calling the man Command     -  
 Calling Overloaded Methods     -  
 Calling a Private Method in jsp     -  
 Calling Functions Dynamically     -  
 Calling other programs from java     -  
 CME display calling number without leading 0     -  
 calling method to form- displaying textbox data in messagbox     -  
 php function     -  

Topic Tags

PHP Functions, PHP OOP