[ create a new paste ] login | about

Link: http://codepad.org/ip0ERfwR    [ raw code | output | fork ]

PHP, pasted on May 5:
<?php

abstract class whale
{

  function __construct()
  {
    // some code here
  }

  function myfunc()
  {
    $this->test();
  }

  abstract function test();
}

class fish extends whale
{
  function __construct()
  {
    parent::__construct();
  }

  function test()
  {
    echo "So you managed to call me !!";
  }

}

$fish = new fish();
$fish->myfunc();


Output:
1
So you managed to call me !!


Create a new paste based on this one


Comments: