[TIPS] Write print_r() Output To File

When debugging a php application, print_r() or var_dump() often use to display the data inside the variable, usually an array that store many data inside. print_r() is core php function to displays information about a variable in a way that's readable by humans. Not just a variable or an array, we can trace or display protected and private properties of objects in PHP 5.But when the php application is called by the curl or other remote connection (not using a web browser), print_r() won't … Read more...