Jump to content

Checking if constant is defined


eldan88

Recommended Posts

Hey guys. When ever a consant is set to an empty string its still shows as it being defined. I have an application that sets some constans based on a form submession. However some optional forms fields has not been filed out and it sets the constants to "". i.e define("NAME", "");

 

Is there any PHP function I can use to tell PHP to preform a set of conditions if the constant is  "". I have tried googling it but couldn't get anything. From what I know isset and empty won't work with constants.

 

Does anyone might have an alternative?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/288264-checking-if-constant-is-defined/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.