Echo ()
Multiple values can be output at one time, and multiple values are separated by commas. Echo is a language structure (language construct), not a real function and therefore cannot be used as part of an expression.
Print ()
The function print () prints a value (its arguments) and returns True if the string is successfully displayed, otherwise false.
Print_r ()
You can simply print the string and the number, and the array is displayed with the enclosed key and the list of merits, starting with an array. However, the result of Print_r () output Boolean and null is meaningless because it is all printed "\ n". So use Var_dump ()
The function is better for debugging.
Var_dump ()
Determine the type and length of a variable, and output the value of the variable if the variable has a value for the variable and the return data type. This function displays structure information about one or more expressions, including the type and value of the expression. The array will recursively expand the value,
Displays its structure by indentation.
The difference between echo print () Print_r () Var_dump ()