1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/reflection/tests/bug39884.phpt
2024-07-10 16:47:31 +02:00

24 lines
632 B
PHP

--TEST--
Bug #39884 (ReflectionParameter::getClass() throws exception for type hint self)
--FILE--
<?php
class stubParamTest
{
function paramTest(self $param)
{
// nothing to do
}
}
$test1 = new stubParamTest();
$test2 = new stubParamTest();
$test1->paramTest($test2);
$refParam = new ReflectionParameter(array('stubParamTest', 'paramTest'), 'param');
var_dump($refParam->getClass());
?>
--EXPECTF--
Deprecated: Method ReflectionParameter::getClass() is deprecated since 8.0, use ReflectionParameter::getType() instead in %s on line %d
object(ReflectionClass)#4 (1) {
["name"]=>
string(13) "stubParamTest"
}