Usage of var_dump () in php

Source: Internet
Author: User
Usage of var_dump () in php
This article describes how to use the var_dump () method in php. For more information, see.

An example of var_dump usage is as follows:

     "; // Var_dump ($ c); $ d = var_dump ($ c); echo"
"; Echo $ a; echo"
"; Echo $ B; echo"
";?>

Output: string (12) "alsdflasdf; a" NULLalsdflasdf;

Note: The var_dump () method is used to determine the type and length of a variable and output the value of the variable. if the variable has a value, the output is the value of the variable and the data type is returned. 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 [,...])

Syntax: var_dump (var, var, bar );

Note: ensure that the variable in var_dump must exist. if the variable exists but the value is NULL, false is returned. If no variable exists, NULL is returned. This function has the output function, so 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.