ID:               21891
 Comment by:       zizka at seznam dot cz
 Reported By:      hz11 at nyu dot edu
 Status:           Wont fix
 Bug Type:         Feature/Change Request
 Operating System: FreeBSD/Linux
 PHP Version:      4.3.0
 New Comment:

Heeeeeeeeeeeeeeyyy!!!

Wake UP! It wouldn't break ANY script if it was optional in the php.ini
file!!!!  As I wrote to derick:



Are the PHP developers getting too lazy to improve PHP a bit?


Previous Comments:
------------------------------------------------------------------------

[2004-03-10 10:56:45] hz11 at nyu dot edu

How would it break existing scripts?  Firstly, CLI scripts aren't that
common yet, and especially those that rely on this type of behavior. 
Secondly, what if it was a config setting, available only when running
as a CLI (akin to argv/argc).  When working with scripts on the console
for interactive programs, or using a CLI script to generate raw XML for
instance, this type of newline mangle makes no sense and is cause for
very hackish scripts.

------------------------------------------------------------------------

[2004-03-08 12:03:42] [EMAIL PROTECTED]

Can not be fixed, as it breaks existing scripts.

------------------------------------------------------------------------

[2004-03-08 11:29:38] hz11 at nyu dot edu

I agree.  Now that the CLI interface has matured it's in fairly
widespread use.  I use CLI continually and this "feature" is a royal
pain.  Perhaps when running in CLI mode this behavior could be
automatically disabled... this would be a much appreciated change.



Or, a special tag as suggested:



<?+

<?-



I would think putting something like this into PHP 5 wouldn't disrupt
things.

------------------------------------------------------------------------

[2004-02-20 02:41:33] threedee32 at rogers dot com

I think it would be useful to have the option to negate this feature,
perhaps with a modified end tag (\?> or something?). That way it would
still be backwards-compatible.

------------------------------------------------------------------------

[2003-05-20 15:34:06] csnyder at chxo dot com

"Included files shouldn't even contain a closing tag, for these exact
reasons."



This is excellent advice, but it is *not* a documented practice. All of
the examples in the Basic Syntax documentation include closing tags. 



In fact, the documentation for include() says:



"... any code inside the target file which should be executed as PHP
code must be enclosed within valid PHP start and end tags."



I agree wholeheartedly that both the documentation and the behavior
should be changed, but to do so is to risk breaking a lot of existing
code.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/21891

-- 
Edit this bug report at http://bugs.php.net/?id=21891&edit=1

Reply via email to