- ob_start: documentation ( source)
- ob_get_contents: documentation ( source)
- file_put_contents: documentation ( source)
- md5: documentation ( source)
<?php
$contents = "<?php
echo 'Hello World';
?>
";
file_put_contents('/tmp/test.php', $contents);
ob_start();
include('/tmp/test.php');
echo 'end';
$output = ob_get_contents();
echo md5($output);