Php and EOT constants
I found a solution to be able to display HTML / PHP and even PHP constants, and then store the extended string in a variable:
my_file.php
Welcome back <?=$User -> get_display_name(); ?>!
index.php
<?
define('HEY', "Welcome to my website!");
ob_start(); ?>
<div id=welcomeBox>
<? if($User -> is_real()): ?>
<? require_once("my_file.php"); ?>
<? else: ?>
<?=HEY; ?> Click <a href=JavaScript:SignUp()>here</a> to sign up!
<? endif; ?>
</div>
<?
$page_body = ob_get_contents();
ob_end_clean(); ?>
<div>
Aye
</div>
<?=$page_body;?>
If the user is real, the output will look something like this:
<div>
Aye
</div>
<div id=welcomeBox>
Welcome back Johnny Cash!
</div>
Otherwise, he would say:
<div>
Aye
</div>
<div id=welcomeBox>
Welcome to my website! Click <a href=JavaScript:SignUp()>here</a> to sign up!
</div>