91亚洲精品福利在线播放,欧美日韩国产在线人成app,天天躁日日躁疯人影院,sao虎视频最新网站入口,精品久久久久久中文字幕女

ReflectionParameter::hasType

(PHP 7, PHP 8)

ReflectionParameter::hasTypeChecks if parameter has a type

說(shuō)明

public ReflectionParameter::hasType(): bool

Checks if the parameter has a type associated with it.

參數

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

返回值

true if a type is specified, false otherwise.

范例

示例 #1 ReflectionParameter::hasType() example

<?php
function someFunction(string $param$param2 null) {}

$reflectionFunc = new ReflectionFunction('someFunction');
$reflectionParams $reflectionFunc->getParameters();

var_dump($reflectionParams[0]->hasType());
var_dump($reflectionParams[1]->hasType());

以上例程的輸出類(lèi)似于:

bool(true)
bool(false)

參見(jiàn)

91亚洲精品福利在线播放,欧美日韩国产在线人成app,天天躁日日躁疯人影院,sao虎视频最新网站入口,精品久久久久久中文字幕女