This is often asked in the interview, you can look at it.
Interview question: compare Echo print () print_r () var_dump ()?
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 (): printing () prints a value (its arguments) and returns True if the string succeeds, or False if it is successfully displayed.
Print_r (): You can simply print the string and the number, and the array is displayed with the enclosed key and the list of merit, beginning with an array. However, the result of Print_r () output Boolean and null is meaningless because it is all printed "\ n". Therefore, using the Var_dump () function is more suitable 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 to lose is a variable and return data type. This function 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.
Comparison of output statements commonly used in PHP?