What function can be used to convert an image into a byte stream in PHP?

To convert an image into a byte stream in PHP, you can use the `file_get_contents()` function to read the image file and then use `base64_encode()` function to encode the image data into a byte stream. This byte stream can be used for various purposes such as storing the image data in a database, sending it over a network, or displaying it on a web page.

$image_path = 'path_to_your_image.jpg';
$image_data = file_get_contents($image_path);
$byte_stream = base64_encode($image_data);

// Now $byte_stream contains the image data in byte stream format