PHP Conference Japan 2024

ReflectionParameter::__toString

(PHP 5, PHP 7, PHP 8)

ReflectionParameter::__toString轉換為字串

說明

public ReflectionParameter::__toString(): 字串

取得參數的人類可讀描述。

參數

此函式沒有參數。

回傳值

字串。

範例

範例 #1 ReflectionParameter::__toString() 範例

<?php
echo new ReflectionParameter('substr', 0);
?>

以上範例的輸出結果類似如下:

Parameter #0 [ <required> string $string ]

另請參閱

新增註解

使用者提供的註解

此頁面沒有使用者提供的註解。
To Top