In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to use the three equal signs of php". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
In php, the three equal signs "===" are congruent comparison operators that compare the values of two operands for equality and detect whether they are of the same type; the result is TRUE only if both values and data types are equal.
Operating environment of this tutorial: Windows 7 system, PHP7.1 version, DELL G3 computer
In php, the three equal signs "===" are congruent comparison operators.
Operator Name Description === congruence Compares the values of two operands for equality and detects whether they are of the same type
The identity (===) operator makes a strict comparison between given variables or values; it compares not only the values of the expressions on both sides of the operator, but also the data types, and the result is TRUE only if the values and data types on both sides are equal.
Note: In the example above,$ x and $ y have equal values but different data types, so they return false and execute the else part.
Extended information: PHP comparison operators
Example Name Description $a == $b = TRUE if the values of $a and $b are equal after type conversion, otherwise FALSE$a === $b congruent TRUE if $a and $b are not only equal in value, but also equal in type, otherwise FALSE$a != $b is not equal to TRUE if the value of $a is not equal to the value of $b after type conversion, otherwise FALSE$a $b is not equal to and!= Same, returns TRUE if the value of $a is not equal to the value of $b after type conversion, otherwise returns FALSE$a !== $b not congruent Returns TRUE if the value of $a is not equal to the value of $b, or if they are of different types; otherwise returns FALSE$a
< $b小与如果 $a 的值小于 $b 的值,则返回 TRUE,否则返回 FALSE$a >$b is greater than $b Returns TRUE if the value of $a is greater than $b, otherwise returns FALSE$a = $b is greater than or equal to $b Returns TRUE if the value of $a is greater than or equal to $b, otherwise returns FALSE$a $b Spacecraft operator (combinatorial comparator) Returns an integer value less than, equal to, and greater than 0 when $a is less than, equal to, and greater than $b, respectively. PHP7 starts offering.$ a ?? $b ?? $cNULL Merge operator The first operand from left to right that exists and is not NULL. If neither is defined and is not NULL, NULL is returned. PHP7 is available now.
"How to use the three equal signs of php" is introduced here. Thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!
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.