fork download
  1. <?php
  2. abstract class hey {
  3. protected function hello() {
  4. echo 'hello from hey';
  5. }
  6. }
  7. class lol extends hey {
  8. protected function hello() {
  9. echo 'hello from lol';
  10. }
  11. public function do_hello() {
  12. self::hello();
  13. parent::hello();
  14. }
  15. }
  16. $lol = new lol();
  17. $lol->do_hello();
Success #stdin #stdout 0.01s 52488KB
stdin
Standard input is empty
stdout
hello from lolhello from hey