All pastes #77846 Raw Edit

trelayne

public php v1 · immutable
·published 2006-07-03 14:09 UTC
rendered paste body
<?php                                                                                                                                                                // base class                                                                                class bclass {  var $x;  function amethod() {     echo "this is the abstract method<br>";  }                                                                                }class xclass  extends bclass {   function amethod () {     echo "this is the x subclass method";   }}class yclass  extends bclass {   function amethod () {     echo "this is the y subclass method";   }}$x = new xclass();$y = new yclass();$objects = array($x, $y);for ($objects as $object) {  $object->amethod();}                                                                                ?>