xref: /PHP-7.0/ext/reflection/tests/bug47254.phpt (revision 6ef92162)
1--TEST--
2Bug #47254
3--CREDITS--
4Sebastian Schürmann
5sebs@php.net
6Testfest 2009 Munich
7--FILE--
8<?php
9class A
10{
11	protected function a() {}
12
13}
14
15class B extends A
16{
17	public function b() {}
18}
19
20$B = new B();
21$R = new ReflectionObject($B);
22$m = $R->getMethods();
23print_r($m);
24
25?>
26--EXPECTF--
27Deprecated: 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
28
29Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; B has a deprecated constructor in %s on line %d
30Array
31(
32    [0] => ReflectionMethod Object
33        (
34            [name] => b
35            [class] => B
36        )
37
38    [1] => ReflectionMethod Object
39        (
40            [name] => a
41            [class] => A
42        )
43
44)
45