trait_example_index
<?php include_once(dirname(__FILE__)."/class.Toy.php"); include_once(dirname(__FILE__)."/class.Car.php"); $oToy = new Toy(); print "Toy name: ".$oToy->getName()."<p>"; print "Toy colour: ".$oToy->getColour()."<p>"; $oCar = new Car(); print "Car model: ".$oCar->getModel()."<p>"; print "Car colour: ".$oToy->getColour()."<p>"; ?>