Phpvar_dump simple test_php tutorial

Source: Internet
Author: User
Phpvar_dump simple test. Voidvar_dump (mixedexpression [, mixedexpression [,...]) This function displays the structure information about one or more expressions, including the expression type and value. The array recursively expands the value void var_dump (mixed expression [, mixed expression [,...]).


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.

*/
Function a_test ($ str) // user-defined function
{
Echo "nhi: $ str"; // output parameters
Var_dump (debug_backtrace (); // output backtrace
}
A_test ('friend'); // call a user-defined function

// Let's look at a var_dump to traverse the object instance.

Class foo {
Private $;
Public $ B = 1;
Public $ c = 'bkjia. c0m ';
Private $ d;
Static $ e;
Public function test (){
Var_dump (get_object_vars ($ this ));
}
}
$ Test = new foo;
Var_dump (get_object_vars ($ test ));
$ Test-> test ();

// Note: to prevent the program from directly outputting the results to the browser, you can use the output control function to capture the output of this function and save them to a variable of the string type, for example.

Http://www.bkjia.com/PHPjc/632339.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/632339.htmlTechArticlevoid var_dump (mixed expression [, mixed expression [,...]) This function displays schema information about one or more expressions, including the type and value of the expression. The array recursively expands the value...

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.