I did a little more research and found out that the EOF; and ?> issue was introduced in UBB.threads 7.2.0

UBB.threads 7.0/7.1 used this cleanup code:
PHP Code
 $line = trim($line);
	if ($line == "<?php") continue;
	if ($line == "?>") continue;
	$line = htmlentities($line); 
Basically, it goes through each line of the island and ignores lines with "<?php" and "?>".

However, the updated 7.2 code makes not much sense:
PHP Code
 $line = trim($line);
	if ($line == "<?php") continue;
	if ($line == "?>" && $eof_found) continue;
	if ($line == "EOF;") $eof_found = true;
	$line = htmlentities($line); 
This look like some unfinished change. It still ignores "<?php" but ignores "?>" only if there was previously ($eof_found = true;) a line with "EOF;".

Originally Posted by Gizmo
But, as previously mentioned, you'll still need to add the body eof coding to your CI.
This is working as well:
Code
$body = "Some output here";
after the format of $body doesn't matter. The only difference is that $body = <<<EOF .... EOF; is easier after there is no need to escape " with \". The problem here is the code in editcustomisland.php that was introduced in 7.2+