NYCPHP Meetup

NYPHP.org

[nycphp-talk] testing a theory

tedd tedd at sperling.com
Tue Feb 20 12:51:46 EST 2007


At 8:22 PM -0500 2/19/07, Paul Houle wrote:
>    Here's a fun fact about <?php that I figured out recently:  I 
>always used to write include files like
>
><?php
>
>...define some functions...
>...define some classes...
>...set a few global variables ...
>
>?>[EOF]
>
>    where [EOF] is the end of the file.
>
>    The trouble was that from time to time,  people using certain 
>editors would cause spaces and carriage returns to appear after the 
>?>.  This had the obnoxious effect of opening the output stream and 
>making it possible to send http headers,  set cookies and do other 
>important things.
>
>    One day I discovered that I didn't need the "?>"...  I could just write
>
><?php
>
>... PHP code...
>[EOF]
>
>    And it works just fine.  It scared the people at the office,  but 
>they were glad to be rid of a nagging problem.

That has always bothered me. I like symmetrical stuff. I start stuff, 
I finish stuff.

<start></start>
{
}
()

But, the idea that one purposely leaves something hanging, is


tedd
-- 
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com



More information about the talk mailing list