bug39127.phpt 561 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #39127 (Old-style constructor fallbacks produce strange results)
  3. --FILE--
  4. <?php
  5. class a { function a() { var_dump("a::a() called"); } }
  6. class b extends a {}
  7. $b = new b;
  8. var_dump(is_callable(array($b,"a")));
  9. var_dump(is_callable(array($b,"b")));
  10. var_dump(is_callable(array($b,"__construct")));
  11. echo "Done\n";
  12. ?>
  13. --EXPECTF--
  14. Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; a has a deprecated constructor in %s on line %d
  15. string(13) "a::a() called"
  16. bool(true)
  17. bool(false)
  18. bool(false)
  19. Done