bug52051.phpt 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. --TEST--
  2. Bug #52051 (handling of case sensitivity of old-style constructors changed in 5.3+)
  3. --FILE--
  4. <?php
  5. class AA {
  6. function AA() { echo "foo\n"; }
  7. }
  8. class bb extends AA {}
  9. class CC extends bb {
  10. function CC() { parent::bb(); }
  11. }
  12. new CC();
  13. class A {
  14. function A() { echo "bar\n"; }
  15. }
  16. class B extends A {}
  17. class C extends B {
  18. function C() { parent::B(); }
  19. }
  20. new C();
  21. ?>
  22. --EXPECTF--
  23. Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; AA has a deprecated constructor in %s on line %d
  24. Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; CC has a deprecated constructor in %s on line %d
  25. 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
  26. Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; C has a deprecated constructor in %s on line %d
  27. foo
  28. bar