echo in-depth understanding echo, Echo is a function//echo function: Output one or more strings to the browser;//echo return value: Void no return value; echo "Today is a good day";//print function: Output string//print return value to the browser: integer 1//The following example: Print speaks a string, and echo prints the return value of print echo ( "Print" Today is a good day);//echo runs faster than print because it has no return value//print_r () displays easy-to-understand information about a variable. If a string, integer, or float is given, the variable value itself is printed. If an array is given, the keys and elements are displayed in a certain format. object is similar to an array//For example $a = [1,2,3,4,]; Print_r ($a);//var_dump () displays structure information about one or more expressions, including the type and value of the expression. The array recursively expands the value and displays its structure by indentation. For example: $b = Array (1, 2, Array ("A", "B", "C")); Var_dump ($b);//For example: $d = 3.1; $c = true; Var_dump ($d, $c);
PHP Four output statements