I tried:
$test = include \'test.php\';
But that just included the file normally
Try file_get_contents().
This function is similar to file(), except that file_get_contents() returns the file in a string.
file()
file_get_contents()