What is the difference between using var_dump() and print_r() to output session data in PHP?

When outputting session data in PHP, var_dump() provides more detailed information about the data type and structure of the variable, including its length and values, while print_r() simply displays the data in a more human-readable format. If you need to quickly check the contents of a session variable, print_r() may be sufficient. However, if you require more detailed information for debugging purposes, var_dump() is the better choice.

// Using var_dump() to output session data
session_start();
var_dump($_SESSION['variable_name']);
```

```php
// Using print_r() to output session data
session_start();
print_r($_SESSION['variable_name']);