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
|
--TEST--
Test that exposing doc comments are supported by internal symbols
--EXTENSIONS--
zend_test
reflection
--FILE--
<?php
$rc = new ReflectionClass(ZendTestPropertyAttribute::class);
var_dump($rc->getDocComment());
$rc = new ReflectionClassConstant(_ZendTestInterface::class, "DUMMY");
var_dump($rc->getDocComment());
$rf = new ReflectionFunction("zend_test_nullable_array_return");
var_dump($rf->getDocComment());
$rp = new ReflectionProperty(new ZendTestPropertyAttribute(""), "parameter");
var_dump($rp->getDocComment());
?>
--EXPECT--
string(82) "/**
* "Lorem ipsum"
* @see https://www.php.net
* @since 8.1
*/"
string(98) "/**
* "Lorem ipsum"
* @see https://www.php.net
* @since 8.2
*/"
string(82) "/**
* "Lorem ipsum"
* @see https://www.php.net
* @since 8.3
*/"
string(98) "/**
* "Lorem ipsum"
* @see https://www.php.net
* @since 8.4
*/"
|