Home  >  Article  >  Backend Development  >  How does php determine whether a constant is defined?

How does php determine whether a constant is defined?

WBOY
WBOYOriginal
2016-07-29 09:00:201927browse

Use the defined function

defined(String constants_name)

If the constant exists, return bool(true)

If it does not exist, return bool(false)


The above introduces how PHP determines whether a constant is defined? , including relevant content, I hope it will be helpful to friends who are interested in PHP tutorials.

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