In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the knowledge of "how to define constants in define in PHP". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Description
1. The variable in PHP refers to the amount by which the value used in the program can be changed. On the contrary, it is constant.
2. After the constant value is defined, nothing else in the script can be changed.
Format
Define (string $name, mixed $value, bool $case_insensitive = false)
$name: general name.
$value: constant value; in PHP5, value must be a standard value (int, float, string, boolean, null) or an array value in PHP7.
$case_insensitive: if set to true, it is case insensitive. By default, case is sensitive. PHP7.3.0 discards constants that define case-insensitivity.
Return value: true is returned on success and false on failure.
Example
Allowed to be array
Define ('People', array (' man', 'woman',' strick')); echo People [1];? > 1 output: woman "how to define constants in PHP" is introduced here, thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.