Difference between 0 and null in php _ PHP Tutorial

Source: Internet
Author: User
Tags exit in
The difference between 0 and null in php. As a qualified php programmer, some basic knowledge must be known, such as the difference between 0 and null. for this difference, we will perform a simple analysis using several instances, as a qualified php programmer, some basic knowledge must be known, such as the difference between 0 and null. for this difference, we will perform a simple analysis using several instances, the principle can only be explained. readers can learn it by themselves.

 In php, 0 is null; // output} if ($ test = '') {echo'
In php, 0 is NULL; // not output} if ($ test = NULL) {echo'
In php, 0 is NULL; // output} if ($ test = NULL) {echo'
In php, 0 is null; // not output} if ($ test = false) {echo'
In php, 0 is null; // output} if ($ test = false) {echo'
In php, 0 is null; // no output}?>
Articles you may be interested in
  • Use break, continue, goto, return, and exit in multiple loops in PHP
  • Differences between variables and functions in php after the static keyword is added
  • Differences between echo, print, print_r, var_export, and var_dump in php
  • Empty, is_null, and isset in php
  • Difference between execute and query methods in ThinkPHP
  • Differences and usage of return, exit, break, and contiue in PHP
  • PHP merges arrays + and array_merge
  • Differences between synchronous requests and asynchronous requests in http requests

...

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: info-contact@alibabacloud.com 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.