Input/Output Learning Mode

Assume that the file I retrieve is a valid GIF format image and that I am running PHP in Linux. What will the output of this code be?

<?php
// This is a valid GIF image
$url = ' https://goo.gl/QycgqH';
file_put_contents('earth.gif', file_get_contents($url));
if (!rename('earth.gif', 'earth.jpeg')) {
 throw new RuntimeException('Could not rename the file.');
}
$finfo = new finfo();
echo $finfo->file('earth.jpeg') . PHP_EOL;