In-depth explanation of php var_dump() function_PHP tutorial

WBOY
Release: 2016-07-21 15:09:16
Original
863 people have browsed it

php var_dump The function is to determine the type and length of a variable and output the value of the variable. If the variable has a value, the value of the variable is output and the data type is returned.
Let’s take a look at the var_dump syntax:

Copy the code The code is as follows:

var_dump (var, var,bar);

Let’s take a look at an example I just gave.
Copy the code The code is as follows:

$ta =1;
$tb ='t';
echo var_dump($ta,$tb);
?>

The output is
Copy code The code is as follows:

int(1) string(1) " t"

The first number is int(1)
It's simple, but one thing to note is that the variables in var_dump must exist. If the variable exists but the value If it is empty, false will be returned;

PHP: What is the var_dump() function used for?
For example, what does var_dump($get); mean?
============================================
This function displays structural information about one or more expressions, including the expression's type and value.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327318.htmlTechArticlephp var_dump function is to determine the type and length of a variable and output the value of the variable. If the variable has a value, output is the value of the variable and returns the data type. Let’s take a look at the var_dump syntax: Copy...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!