|
ReflectionMethod::__constructReflectionMethod を作成する 説明
public ReflectionMethod::__construct(objectstring
$objectOrMethod, string $method)代替のシグネチャ (名前付き引数をサポートしていません): public ReflectionMethod::__construct(string
$classMethod)警告
この代替のシグネチャは PHP 8.4.0 以降で非推奨となりました。 代わりに ReflectionMethod::createFromMethodName を使用してください。 新しい ReflectionMethod を作成します。 パラメータ
エラー / 例外指定したメソッドが存在しない場合に ReflectionException が発生します。 例
例1 ReflectionMethod::__construct の例 上の例の出力は、 たとえば以下のようになります。
===> The user-defined final public static method 'increment' (which is a regular method)
declared in /Users/philip/cvs/phpdoc/test.php
lines 14 to 17
having the modifiers 261[final public static]
---> Documentation:
'/**
* カウンタをインクリメントする
*
* @final
* @static
* @access public
* @return int
*/'
---> Invocation results in: int(1)
|