PHP

Objects

<?php
class dog {
   public function bark() {
      print "Woof!\n";
   }
}

class poodle extends dog {
   public function bark() {
      print "Yip!\n";
   }
}

$poppy = new poodle;
$poppy->bark();
?>

José M. Vidal .

21 of 33