PHP Misc 参考手册
检查某常量是否存在:
<?php define("GREETING","Hello you! How are you today?"); echo defined("GREETING"); ?>
defined() 函数检查某常量是否存在。
defined(name)