1--TEST--
2Test get_class_methods() function : basic functionality
3--FILE--
4<?php
5/*
6 * Test behaviour with interfaces.
7 */
8
9interface I {
10    public function pubI();
11
12}
13
14class C implements I {
15    public function pubI() {}
16
17    private function privC() {}
18    protected function protC() {}
19    public function pubC() {}
20
21    public static function testFromC() {
22        echo "Accessing I from C:\n";
23        var_dump(get_class_methods("I"));
24        echo "Accessing C from C:\n";
25        var_dump(get_class_methods("C"));
26    }
27}
28
29
30echo "Accessing I from global scope:\n";
31var_dump(get_class_methods("I"));
32echo "Accessing C from global scope:\n";
33var_dump(get_class_methods("C"));
34C::testFromC();
35echo "Done";
36?>
37--EXPECT--
38Accessing I from global scope:
39array(1) {
40  [0]=>
41  string(4) "pubI"
42}
43Accessing C from global scope:
44array(3) {
45  [0]=>
46  string(4) "pubI"
47  [1]=>
48  string(4) "pubC"
49  [2]=>
50  string(9) "testFromC"
51}
52Accessing I from C:
53array(1) {
54  [0]=>
55  string(4) "pubI"
56}
57Accessing C from C:
58array(5) {
59  [0]=>
60  string(4) "pubI"
61  [1]=>
62  string(5) "privC"
63  [2]=>
64  string(5) "protC"
65  [3]=>
66  string(4) "pubC"
67  [4]=>
68  string(9) "testFromC"
69}
70Done
71