uopz_undefine

定数を未定義化

説明

bool uopz_undefine(string $constant)
bool uopz_undefine(string $class, string $constant)

実行時に定数を除去します。

パラメータ

class

constant を含むクラスの名前

constant

既存の定数名

戻り値

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

例1 uopz_undefine の例

<?php
define
("MY"true);

uopz_undefine("MY");

var_dump(defined("MY"));
?>

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

bool(false)