Daevid Vincent wrote:
> I'm having a debate with a co-worker about adding the final ?> on a PHP
> page...
> To be honest, I am the lead, and I could pull rank and be done with the
> discussion, however I don't like to be that way. I would rather do the
> right thing. If my way of thinking is old-school (I've been coding since
> PHP/FI), and what he says is the newfangled proper PHP/Zend way, then I'd
> rather adopt that, despite how icky it makes me feel to leave an unclosed
> <?php just dangling and alone, all sad-like. In my mind, "nobody gets left
> behind"! :)
> Is there ANY side-effects to leaving the end ?> off? Is it any more work
> for the compiler? And yes I know computers are hella-fast and all that, but
> I come from the gaming industry where squeeking out an extra FPS matters,
> and shaving off 0.01s per row of data in a table matters if you have more
> than 100 rows. A 1 second wait IS noticeable and a 10 second is even moreso
> -- just try to talk for 10 seconds straight without a pause. Or sit there
> and stare at a screen for 10 seconds!
> If the main argument is that it's to prevent white-space after the code,
> then most modern editors that I'm aware of will automatically trim
> white-space (or have a setting to do so). Plus this is ONLY a factor when
> you're trying to output a header and things like that. In 90% of your code,
> you don't deal with that. It's also obvious enough when you have an extra
> character/space because PHP pukes on the screen and TELLS you something
> about "blah blah sent before header output" or something to that effect.
> What do you guys all do?

i negate the ?> and treat ?> purely as an instruction to tell php to
stop parsing (because that's what it is) thus for 100% php files you'll
find no ?> in my code; however when it's an html page and esacping in
and out of parser mode is required then obviously I'll use ?>

regards & sorry for the late reply

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to