diff options
Diffstat (limited to 'oo/magic_methods.php')
-rw-r--r-- | oo/magic_methods.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/oo/magic_methods.php b/oo/magic_methods.php new file mode 100644 index 0000000..8d9da79 --- /dev/null +++ b/oo/magic_methods.php @@ -0,0 +1,16 @@ +<?php + +abstract class Base { + protected $arr; + + function __construct() { + echo 'dispatching ctor'; + $this->arr = array(); + } + + abstract protected function foo(); +} + +class Derived extends Base { + +}
\ No newline at end of file |