ReflectionGenerator::getTrace
実行中のジェネレータのトレースを取得する
&reftitle.description;
public arrayReflectionGenerator::getTrace
intoptionsDEBUG_BACKTRACE_PROVIDE_OBJECT
現在実行中のジェネレータのトレースを取得します。
&reftitle.parameters;
options
options の値は以下のフラグのうちのいずれかです:
利用可能なオプション
オプション
説明
DEBUG_BACKTRACE_PROVIDE_OBJECT
デフォルト
DEBUG_BACKTRACE_IGNORE_ARGS
スタックトレース内の関数に引数の情報を含めない
&reftitle.returnvalues;
現在実行中のジェネレータのトレースを返します。
&reftitle.examples;
ReflectionGenerator::getTrace の例
valid(); // ジェネレータを開始
var_dump((new ReflectionGenerator($gen))->getTrace());
]]>
&example.outputs.similar;
array(4) {
["file"]=>
string(18) "example.php"
["line"]=>
int(8)
["function"]=>
string(3) "foo"
["args"]=>
array(0) {
}
}
[1]=>
array(4) {
["file"]=>
string(18) "example.php"
["line"]=>
int(12)
["function"]=>
string(3) "bar"
["args"]=>
array(0) {
}
}
}
]]>
&reftitle.seealso;
ReflectionGenerator::getFunction
ReflectionGenerator::getThis