Results of 1 - 2 of about 2 for consts (0.001 sec.)
- ReflectionClass::getReflectionConstants — クラス定数を取得する | PHP 8.3 11228
- ReflectionClass::getReflectionConstants (PHP 7 >= 7.1.0, PHP 8) ReflectionClass::getReflectionConstants — クラス定数を取得する 説明 public function ReflectionClass::getReflectionConstants ( ? int $filter = null ): array リフレクションされた
... FOO = 1 ; protected const BAR = 2 ; private const BAZ = 3 ; } $foo = new Foo (); $reflect = new ReflectionClass ( $foo ); $consts = $reflect -> getReflectionConstants (); foreach ( $consts as $const ) { print $const -> getName () . "\n" ; } var_dump ( ... $consts ); ?> 上の例の出力は、 たとえば以下のようになります。 FOO BAR BAZ array(3) { [0]=> object(ReflectionClassConstant)#3 (2) { ...
-
https://man.mtool.work/php/8.3/reflectionclass.getreflectionconstants.html
- 定義済み定数 | PHP 8.3 7485
- 定義済み定数 以下の定数が定義されています。 この関数の拡張モジュールが PHP 組み込みでコンパイルされているか、 実行時に動的にロードされている場合のみ使用可能です。 RUNKIT7_IMPORT_FUNCTIONS ( int ) runkit7_import() flag indicating that normal
... int ) runkit7_import() flag indicating that class methods should be imported from the specified file. RUNKIT7_IMPORT_CLASS_CONSTS ( int ) runkit7_import() flag indicating that class constants should be imported from the specified file. RUNKIT7_IMPORT_C ...
-
https://man.mtool.work/php/8.3/runkit7.constants.html
PREV
1
NEXT