欧美AV无码一区二区,麻豆+无码+国产在线+观看,欧美狂躁少妇XXXX高潮无码,美女扒开屁股让男人桶免费观看,极品粉嫩国产18尤物在线播放

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)

欧美AV无码一区二区,麻豆+无码+国产在线+观看,欧美狂躁少妇XXXX高潮无码,美女扒开屁股让男人桶免费观看,极品粉嫩国产18尤物在线播放