Go deep into the usage of var_dump in php

Source: Internet
Author: User

First look at the instance:

Copy codeThe Code is as follows: <? Php
$ A = "alsdflasdf; ";
$ B = var_dump ($ );
Echo "<br> ";
// Var_dump ($ c );
$ D = var_dump ($ c );
Echo "<br> ";
Echo $;
Echo "<br> ";
Echo $ B;
Echo "<br> ";
Output:
String (12) "alsdflasdf;"
NULL
Alsdflasdf;

What does it mean?The var_dump () method is to judge the type and length of a variable and output the value of the variable. If the variable has a value, it is the value of the variable and returns the data type. this function displays the structure information about one or more expressions, including the expression type and value. The array recursively expands the value and displays its structure through indentation.
Format: var_dump (mixed expression [, mixed expression [,...])
Let's look at the var_dump Syntax:
Var_dump (var, var, bar );
Note that the variables in var_dump must exist. If a variable exists but the value is NULL, false is returned. If no variable exists, NULL is returned. he has an output function. You do not need to add other output functions.

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.