xref: /PHP-7.1/Zend/tests/bug52051.phpt (revision 6ef92162)
1--TEST--
2Bug #52051 (handling of case sensitivity of old-style constructors changed in 5.3+)
3--FILE--
4<?php
5
6class AA {
7    function AA() { echo "foo\n"; }
8}
9class bb extends AA {}
10class CC extends bb {
11   function CC() { parent::bb(); }
12}
13new CC();
14
15class A {
16    function A() { echo "bar\n"; }
17}
18class B extends A {}
19class C extends B {
20   function C() { parent::B(); }
21}
22new C();
23
24?>
25--EXPECTF--
26Deprecated: 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
27
28Deprecated: 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
29
30Deprecated: 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
31
32Deprecated: 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
33foo
34bar
35