xref: /PHP-7.4/ext/reflection/tests/bug41061.phpt (revision 3121b717)
1--TEST--
2Reflection Bug #41061 ("visibility error" in ReflectionFunction::__toString())
3--FILE--
4<?php
5
6function foo() {
7}
8
9class bar {
10    private function foo() {
11    }
12}
13
14echo new ReflectionFunction('foo'), "\n";
15echo new ReflectionMethod('bar', 'foo'), "\n";
16?>
17===DONE===
18<?php exit(0); ?>
19--EXPECTF--
20Function [ <user> function foo ] {
21  @@ %sbug41061.php 3 - 4
22}
23
24Method [ <user> private method foo ] {
25  @@ %sbug41061.php 7 - 8
26}
27
28===DONE===
29