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
The Art and Science of Java
Eric Roberts / Addison-Wesley / 2007-3-1 / USD 121.60
In The Art and Science of Java, Stanford professor and well-known leader in CS Education Eric Roberts emphasizes the student-friendly exposition that led to the success of The Art and Science of C. By......一起来看看 《The Art and Science of Java》 这本书的介绍吧!