summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/bug41061.phpt
blob: df807566dbb0da8db646d794f9cb25b06ca872d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
Reflection Bug #41061 ("visibility error" in ReflectionFunction::__toString())
--FILE--
<?php

function foo() {
}

class bar {
    private function foo() {
    }
}

echo new ReflectionFunction('foo'), "\n";
echo new ReflectionMethod('bar', 'foo'), "\n";
?>
--EXPECTF--
Function [ <user> function foo ] {
  @@ %sbug41061.php 3 - 4
}

Method [ <user> private method foo ] {
  @@ %sbug41061.php 7 - 8
}