constructor_args.phpt 356 B

1234567891011121314151617181920
  1. --TEST--
  2. Different numbers of arguments in __construct()
  3. --FILE--
  4. <?php
  5. interface foobar {
  6. function __construct();
  7. }
  8. abstract class bar implements foobar {
  9. public function __construct($x = 1) {
  10. }
  11. }
  12. final class foo extends bar implements foobar {
  13. public function __construct($x = 1, $y = 2) {
  14. }
  15. }
  16. new foo;
  17. print "ok!";
  18. ?>
  19. --EXPECT--
  20. ok!