How does the include function in PHP differ from returning the content of a file?

The include function in PHP includes and evaluates a specified file during the execution of the script. It is useful for reusing code across multiple files. On the other hand, returning the content of a file simply reads the contents of the file as a string and does not execute any PHP code within it.

// Using include function
include 'file.php';

// Using file_get_contents to return the content of a file
$content = file_get_contents('file.php');
echo $content;