Once I had a bug that I spent about a hour trying to solve. One of my cats had stepped on the keyboard’s backtick key (upper left corner) and no matter how often I looked I didn’t see the ` (well, until the last time)
But I do put more effort into keeping my monitor clean now
A good tip is in whatever program your writing the code in, use a font that has fixed character widths eg Lucida Console, Courier, etc. It makes it a bit easier to spot stray things like ` lurking in code, also try not to use too small a font size.
Another thing that will help (if the program that your using allows it) is syntax highlighting, things like built-in function names, constants, comments etc each get shown in a different font colour.
No comments and no flames… If find it strange that the page works if you use the phpinfo() function but no if you remove it. I know that you verified, but have you tried to use the code archive directly? Does that file work? Then, it is obvious that you mistyped something. It is the only thing that make sense… maybe a semi-colon ([noparse];[/noparse]) at the end of the instruction?
I admit I’m confused too. There isn’t much PHP in that file for it to go wrong.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Today’s Date</title>
<meta http-equiv="content-type"
content="text/html; charset=utf-8"/>
</head>
<body>
<p>Today’s date (according to this web server) is
<?php
echo date('l, F dS Y.');
?>
</p>
</body>
</html>
Are you certain there isn’t an extraneous character between the <?php and the echo somewhere?