fork(1) download
  1. <?php
  2. function m(Bar $x) {
  3. $x->m('Error Processing Request');
  4. }
  5. class Bar {
  6. public function m($message) {
  7. echo "Bar\n";
  8. var_dump($message);
  9. }
  10. }
  11. class Foo extends Bar {
  12. public function m($message, $code, $timer) {
  13. var_dump($code, $timer);
  14. echo "Foo\n";
  15. parent::m($message);
  16. }
  17. }
  18. m(new Foo);
Success #stdin #stdout #stderr 0.01s 52488KB
stdin
Standard input is empty
stdout
NULL
NULL
Foo
Bar
string(24) "Error Processing Request"
stderr
PHP Warning:  Missing argument 2 for Foo::m(), called in /home/ucPV6w/prog.php on line 3 and defined in /home/ucPV6w/prog.php on line 12
PHP Warning:  Missing argument 3 for Foo::m(), called in /home/ucPV6w/prog.php on line 3 and defined in /home/ucPV6w/prog.php on line 12
PHP Notice:  Undefined variable: code in /home/ucPV6w/prog.php on line 13
PHP Notice:  Undefined variable: timer in /home/ucPV6w/prog.php on line 13