69pao国产精品视频-久久精品一区二区二三区-精品国产精品亚洲一本大道-99国产综合一区久久

PHP constant() 函數(shù)

PHP constant() 函數(shù)

PHP Misc 參考手冊(cè) PHP Misc 參考手冊(cè)

實(shí)例

返回一個(gè)常量的值:

<?php
//define a constant
define("GREETING","Hello you! How are you today?");

echo constant("GREETING");
?>

運(yùn)行實(shí)例 ?

定義和用法

constant() 函數(shù)返回一個(gè)常量的值。

注釋: 該函數(shù)也適用于 class 常量。

語(yǔ)法

constant(constant)

參數(shù) 描述
constant 必需。規(guī)定要檢查的常量的名稱。

技術(shù)細(xì)節(jié)

返回值: 返回常量的值,如果常量未定義則返回 NULL。
PHP 版本: 4+

PHP Misc 參考手冊(cè) PHP Misc 參考手冊(cè)
相關(guān)文章