[PHP-DEV] CVS Account Request: ernestyang

2003-02-22 Thread ernest
Maintaining the documentation

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] Re: [PHP] Do I need the closing ? tag

2002-11-08 Thread Ernest E Vogelsinger
At 23:24 08.11.2002, David McArthur said:
[snip]
PHP 4.2.2 (linux) doesn't seem to mind if I leave off the closing ? tag at
the end of a file.  Is the ? assumed at EOF?

I have PHP that outputs binary and along the way I include() a lot of php
scripts.  I'm constantly having problems when I leave a little whitespace at
the end of some script after the ? which screws up the output binary.
First time this happened it took me hours to figure out the cause.

What does everyone think about just leaving off the ? as a solution to
this?  It works for me now, but would any PHP developer care to
prognosticate on the liklihood this might change in future?
[snip] 

The least I can say that it's bad style... it's not documented, and
therefore any tag should be closed.

Most ascii editors can be configured to discard trailing whitespaces; and
PHP will even ignore a newline character following immediately a closing tag:

--[html]-
xmpOutside?php
echo 'Inside';
?
Outside/xmp
--[html]-
will correctly produce this:
OutsideInsideOutside

-- 
   O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php