Home  >  Article  >  Backend Development  >  一个值可以有不同的常量名

一个值可以有不同的常量名

WBOY
WBOYOriginal
2016-06-23 13:42:08858browse

例如这样

// 开关状态
define('YES_VALUE', 1);
define('NO_VALUE', 2);

//性别
define('MALE_VALUE', 1);
define('FEMALE_VALUE', 2);
define('UNKNOW_VALUE', 3);


回复讨论(解决方案)

对的
常量名只是为了帮助记忆的符号

这个是可以有的~~

??可以。
??量一?,都是值?名???的。

可以,常量名只是一个符号而已

常量就是标示符名称而已,便于区别。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn