PHP _php Tutorials for some small problems

Source: Internet
Author: User
Organize out 2 to learn from everyone

1, three equals sign and two equals sign difference "= = =" VS "= = "

For example, you'll get a function that returns these kinds of situations:
1, more than 0 of the number
2, less than 0 of the number
3, equals 0 of the number (that is, 0)
4, False (On Failure)
At this time if you want to capture the failure, you must use = = = And not use = =
because = = In addition to match the 4th case, will also match the 3rd case, because 0 is also false!

In a

$a = ' 2 ';//character 2
$b =2;//Numerical Model 2
$a = = $b, it's right, it's all 2.
$a = = = $b, is wrong, because $ A is a character $b is numeric, the value is the same, but the type is different.

2. What does three angle brackets in PHP do? "<<<"
Copy CodeThe code is as follows:
$somevar = << Put your code or words here

This is a code snippet. The advantage of using code snippets in PHP is that when you need to output a piece of code (which can include multiple lines), the snippet can maintain a more logical pattern. Often used to insert HTML code.

Note that Someword is any character that represents the meaning of a token. <<
can be used to include both single and double quotes in an assignment en PW Many of this true Span id= "Isbasedonurl" itemprop= "Isbasedonurl" > techarticle finishing up 2 for everyone to learn the difference between 1, three equals and two equals "= = = "VS" = = "For example, you have a function that returns these situations: 1, more than 0 of the number 2, less than 0 of the number 3, etc...

  • Related Article

    Contact Us

    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: and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.