xref: /PHP-7.4/Zend/tests/bug39127.phpt (revision 782352c5)
1--TEST--
2Bug #39127 (Old-style constructor fallbacks produce strange results)
3--FILE--
4<?php
5
6class a { function a() { var_dump("a::a() called"); } }
7class b extends a {}
8
9$b = new b;
10var_dump(is_callable(array($b,"a")));
11var_dump(is_callable(array($b,"b")));
12var_dump(is_callable(array($b,"__construct")));
13
14echo "Done\n";
15?>
16--EXPECTF--
17Deprecated: 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
18string(13) "a::a() called"
19bool(true)
20bool(false)
21bool(false)
22Done
23