Yep, that's normal behaviour.
PHP code is pre-processed on the server, and the results are sent to the client. The client then interprets it. Typically, this is used in a web environment, so PHP generates the dynamic content and sends the results in HTML:
PHP Code:
<?php
if (date("a") == "pm")
{
$sPartOfDay = "evening";
}
else
{
$sPartOfDay = "morning";
}
printf('<p>good %s</p>', $sPartOfDay);
?>
Would be the PHP code, and what the browser sees is:
Code:
<p>good afternoon</p>
or good morning if its 'am'. So what you see in the browser is only what is printed or echo'd to the browser, or anything outside of <?php and ?> tags.