fork(1) download
  1. <?php
  2.  
  3. class A{
  4. public static function hello(){
  5. echo 'hello';
  6. }
  7. }
  8.  
  9. class B extends A{
  10. public static function ok(){
  11. echo 'ok';
  12. }
  13.  
  14. public function fprint(){
  15. A::hello();
  16. $this->ok();
  17. }
  18. }
  19.  
  20. $obj = new B;
  21. $obj->fprint();
  22. ?>
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
hellook