PHP 雜項函數
constant() 函數返回常量的值。
constant(constant)
注釋:該函數僅適用于 class 常量。
<?php //定義一個常量 define("GREETING","Hello world!"); echo constant("GREETING"); ?>
輸出:
Hello world!