CakeFest 2024: The Official CakePHP Conference

ReflectionClass::isInternal

(PHP 5, PHP 7, PHP 8)

ReflectionClass::isInternal拡張モジュールあるいはコアで定義された内部クラスであるかどうかを調べる

説明

public ReflectionClass::isInternal(): bool

そのクラスが拡張モジュールやコアで定義された内部クラスである (ユーザーが定義したものではない) かどうかを調べます。

パラメータ

この関数にはパラメータはありません。

戻り値

成功した場合に true を、失敗した場合に false を返します。

例1 ReflectionClass::isInternal() の基本的な使用例

<?php
$internalclass
= new ReflectionClass('ReflectionClass');

class
Apple {}
$userclass = new ReflectionClass('Apple');

var_dump($internalclass->isInternal());
var_dump($userclass->isInternal());
?>

上の例の出力は以下となります。

bool(true)
bool(false)

参考

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top