How can file size in bytes be retrieved using PHP?

To retrieve the file size in bytes using PHP, you can use the `filesize()` function. This function takes the file path as a parameter and returns the size of the file in bytes. You can then echo or store this value for further use in your code.

$file = 'path/to/your/file.txt';
$fileSize = filesize($file);
echo "File size: " . $fileSize . " bytes";