xref: /php-src/ext/reflection/tests/bug41061.phpt (revision a555cc0b)
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--EXPECTF--
18Function [ <user> function foo ] {
19  @@ %sbug41061.php 3 - 4
20}
21
22Method [ <user> private method foo ] {
23  @@ %sbug41061.php 7 - 8
24}
25
26