PHP constant() 函数
PHP 教程
· 2019-01-27 11:42:17
实例
返回一个常量的值:
<?php
//define a constant
define("GREETING","Hello you! How are you today?");
echo constant("GREETING");
?>
//define a constant
define("GREETING","Hello you! How are you today?");
echo constant("GREETING");
?>
定义和用法
constant() 函数返回一个常量的值。
注释: 该函数也适用于 class 常量。
语法
constant(constant)
| 参数 | 描述 |
|---|---|
| constant | 必需。规定要检查的常量的名称。 |
技术细节
| 返回值: | 返回常量的值,如果常量未定义则返回 NULL。 |
|---|---|
| PHP 版本: | 4+ |
点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html
Music Recommendation and Discovery
Òscar Celma / Springer / 2010-9-7 / USD 49.95
With so much more music available these days, traditional ways of finding music have diminished. Today radio shows are often programmed by large corporations that create playlists drawn from a limited......一起来看看 《Music Recommendation and Discovery》 这本书的介绍吧!