1--TEST--
2Test that displaying doc comments via reflection is supported by internal symbols
3--EXTENSIONS--
4zend_test
5reflection
6--FILE--
7<?php
8
9$rc = new ReflectionClass(ZendTestPropertyAttribute::class);
10echo $rc->__toString() . "\n";
11
12$rc = new ReflectionClassConstant(_ZendTestInterface::class, "DUMMY");
13echo $rc->__toString() . "\n";
14
15$rf = new ReflectionFunction("zend_test_nullable_array_return");
16echo $rf->__toString() . "\n";
17
18$rp = new ReflectionProperty(new ZendTestPropertyAttribute(""), "parameter");
19echo $rp->__toString() . "\n";
20
21?>
22--EXPECT--
23/**
24     * "Lorem ipsum"
25     * @see https://www.php.net
26     * @since 8.1
27     */
28Class [ <internal:zend_test> final class ZendTestPropertyAttribute ] {
29
30  - Constants [0] {
31  }
32
33  - Static properties [0] {
34  }
35
36  - Static methods [0] {
37  }
38
39  - Properties [1] {
40    /**
41         * "Lorem ipsum"
42         * @see https://www.php.net
43         * @since 8.4
44         */
45    Property [ public string $parameter ]
46  }
47
48  - Methods [1] {
49    Method [ <internal:zend_test, ctor> public method __construct ] {
50
51      - Parameters [1] {
52        Parameter #0 [ <required> string $parameter ]
53      }
54    }
55  }
56}
57
58/**
59         * "Lorem ipsum"
60         * @see https://www.php.net
61         * @since 8.2
62         */
63Constant [ public int DUMMY ] { 0 }
64
65/**
66     * "Lorem ipsum"
67     * @see https://www.php.net
68     * @since 8.3
69     */
70Function [ <internal:zend_test> function zend_test_nullable_array_return ] {
71
72  - Parameters [0] {
73  }
74  - Return [ ?array ]
75}
76
77/**
78         * "Lorem ipsum"
79         * @see https://www.php.net
80         * @since 8.4
81         */
82Property [ public string $parameter ]
83