How does php determine whether a constant is defined?

WBOY
Release: 2016-07-29 09:00:20
Original
1953 people have browsed it

Use the defined function

defined(String constants_name)

If the constant exists, return bool(true)

If it does not exist, return bool(false)

Copy after login

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.

Related labels:
source:php.cn
Statement of this Website
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