fork(1) download
  1. <?php
  2.  
  3. class Prnt {
  4. public function __construct() {
  5. echo 'In Prnt';
  6. }
  7. }
  8.  
  9. class A extends Prnt {
  10. public function __construct() {
  11. echo 'In A';
  12. }
  13. }
  14.  
  15. class B extends A {
  16. public function __construct() {
  17. echo 'In B' . PHP_EOL;
  18. Prnt::__construct();
  19. }
  20. }
  21.  
  22. new B();
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
In B
In Prnt