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