PHP Print_r | PHP Print Array | PrintF | PHP Print Variables and Object

PHP Print_r Function


PHP print_r() is a built-in function that displays information about a variable in a human-readable way. It shows the information stored in a variable, which is easily understandable to the user.

There are two more functions similar to print_r() which are var_export(), and var_dump(). They display the private and protected properties of objects.