Is it recommended to use var_dump or print_r for displaying return values in PHP methods?

When displaying return values in PHP methods, it is recommended to use var_dump over print_r. Var_dump provides more detailed information about the variable being dumped, including its type and value, making it easier to debug and understand the data being returned.

// Using var_dump to display return values in PHP methods
$returnValue = someMethod();
var_dump($returnValue);