男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站

ReflectionFunctionAbstract::getReturnType

(PHP 7, PHP 8)

ReflectionFunctionAbstract::getReturnTypeGets the specified return type of a function

說(shuō)明

public ReflectionFunctionAbstract::getReturnType(): ?ReflectionType

Gets the specified return type of a reflected function.

參數

此函數沒(méi)有參數。

返回值

Returns a ReflectionType object if a return type is specified, null otherwise.

范例

示例 #1 ReflectionFunctionAbstract::getReturnType() example

<?php

function to_int($param) : int {
    return (int) 
$param;
}

$reflection1 = new ReflectionFunction('to_int');
echo 
$reflection1->getReturnType();

以上例程會(huì )輸出:

int

示例 #2 Usage on built-in functions

<?php

$reflection2 
= new ReflectionFunction('array_merge');

var_dump($reflection2->getReturnType());

以上例程會(huì )輸出:

null

This is because many internal functions do not have types specified for their parameters or return values. It is therefore best to avoid using this method on built-in functions.

參見(jiàn)

男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站