(PHP 8 >= 8.1.0)
ReflectionFunctionAbstract::hasTentativeReturnType — 傳回函式是否具有暫定回傳類型
此函式沒有參數。
範例 #1 ReflectionFunctionAbstract::hasTentativeReturnType() 範例
<?php
$method = new ReflectionMethod(\ArrayAccess::class, 'offsetGet');
var_dump($method->hasTentativeReturnType());
上述範例將輸出
bool(true)