In PHP, when other types are converted to the Bool type, the following error occurs: if (true = 2) in PHP, Will true or false be returned?
The result is true. in this case, I will test other php Data types.
Conclusion:
When converted to the
This article summarizes some situations when PHP is transitioned to Boolean (bool). It is very simple. if you need it, you can refer to the following questions: in PHP, if (true = 2) will return true or false?
The result is true. in this case, I
This article summarizes some situations when PHP is transitioned to Boolean (bool). It is very simple. if you need it, you can refer to the following questions: in PHP, if (true = 2) will return true or false?
The result is true. in this case, I
This article gives you a summary of the next PHP conversion to a Boolean (bool) type of situation, very simple, the need for small partners can refer to the following
The question is: Will the IF (true==2) in PHP return True or false?
The result
Type hints, type safeReal-Park Learning videoThe original link of the park learningOne of the most compelling new features in PHP 7 is undoubtedly the scalar type hints. We can use scalar type hints in function parameters and return values, and we
Three ways to convert data types in PHP, data types three ways
PHP's data type conversions are cast, and the PHP data types that are allowed to be converted are:
1. (int), (integer): Convert to Reshape2. (float), (double), (real): Convert to
Obtain the Data Type: to view the value and type of an expression, use var_dump (). If you just want to get an easy-to-understand expression of the type for debugging, use gettype (). To view a type, use the is_type () function instead of gettype. ■
PHP operating mechanism and principle (underlying), and php operating mechanism. The PHP operating mechanism and principle (underlying). when talking about the php operating mechanism, we should first introduce the php module. php has three modules
PHP from Mastery to getting started
(i) Introduction and basic knowledge of PHP
PHP (foreign name: Php:hypertext Preprocessor, Chinese name: "HypertextPreprocessor") is a commonOpen Sourcescripting language。GrammarAbsorbed theC
Get data type: If you want to see the value and type of an expression, use var_dump ().If you just want an easy-to-read type of expression for debugging, use GetType ().To view a type, do not use GetType () and use the Is_type () function.Convert
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.