PHP defined() 函数

PHP 教程 · 2019-01-27 12:13:03

实例

检查某常量是否存在:

<?php
define("GREETING","Hello you! How are you today?");
echo defined("GREETING");
?>

定义和用法

defined() 函数检查某常量是否存在。

语法

defined(name)

参数 描述
name 必需。规定要检查的常量的名称。

技术细节

返回值: 如果常量存在,则返回 TRUE,否则返回 FALSE。
PHP 版本: 4+

点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html

查看所有标签

Eloquent JavaScript

Eloquent JavaScript

Marijn Haverbeke / No Starch Press / 2011-2-3 / USD 29.95

Eloquent JavaScript is a guide to JavaScript that focuses on good programming techniques rather than offering a mish-mash of cut-and-paste effects. The author teaches you how to leverage JavaScript's......一起来看看 《Eloquent JavaScript》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

html转js在线工具
html转js在线工具

html转js在线工具