In what way does the code snippet provided handle file reading and writing in PHP?

The code snippet provided uses the `file_get_contents()` function to read the contents of a file and the `file_put_contents()` function to write data to a file in PHP. This approach simplifies the process of file handling by directly reading and writing file contents without the need for opening and closing file handles.

// Read file contents
$file_contents = file_get_contents('example.txt');

// Modify file contents
$file_contents .= "New content to append\n";

// Write modified contents back to the file
file_put_contents('example.txt', $file_contents);