From b2779c2b6e82b116b049f0435dee73dec45b9862 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 4 Aug 2024 16:31:25 +0900 Subject: [PATCH] Document uopz_get_static() change regarding static https://github.com/php/doc-en/commit/b5e484908859c4d96e212fb4ec6f5af2526db288 --- reference/uopz/functions/uopz-get-static.xml | 116 +++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 reference/uopz/functions/uopz-get-static.xml diff --git a/reference/uopz/functions/uopz-get-static.xml b/reference/uopz/functions/uopz-get-static.xml new file mode 100644 index 00000000000..b0e2873e320 --- /dev/null +++ b/reference/uopz/functions/uopz-get-static.xml @@ -0,0 +1,116 @@ + + + + + + uopz_get_static + 関数またはメソッドスコープから、static変数を取得する + + + + &reftitle.description; + + arrayuopz_get_static + stringclass + stringfunction + + + arrayuopz_get_static + stringfunction + + + 関数またはメソッドスコープから、static変数を取得します。 + + + + + &reftitle.parameters; + + + class + + + クラスの名前 + + + + + function + + + 関数またはメソッドの名前 + + + + + + + + &reftitle.returnvalues; + + 成功した場合、現在の値にマップされた変数名の連想配列を返します。 + 関数やメソッド名が存在しない場合は &null; を返します。 + + + PHP 8.3.0 以降では、static 変数の初期化子はコンパイル時に計算されますが、 + それが不可能な場合、つまり関数やメソッドが初回実行される場合のみ、 + 初回実行前の static変数の値は &null; として報告されます。 + + + + + &reftitle.examples; + + <function>uopz_get_static</function> の基本的な使い方 + + +]]> + + &example.outputs; + + + string(3) "baz" +} +]]> + + + + + + &reftitle.seealso; + + ReflectionFunctionAbstract::getStaticVariables + uopz_set_static + + + + + +