interface_optional_arg.phpt 303 B

123456789101112131415161718192021222324
  1. --TEST--
  2. ZE2 An interface method allows additional default arguments
  3. --FILE--
  4. <?php
  5. error_reporting(4095);
  6. interface test {
  7. public function bar();
  8. }
  9. class foo implements test {
  10. public function bar($foo = NULL) {
  11. echo "foo\n";
  12. }
  13. }
  14. $foo = new foo;
  15. $foo->bar();
  16. ?>
  17. --EXPECT--
  18. foo