Edit report at https://bugs.php.net/bug.php?id=77378&edit=1
ID: 77378
User updated by: olafvdspek at gmail dot com
Reported by: olafvdspek at gmail dot com
Summary: Default to short_open_tags = false
Status: Open
Type: Feature/Change Request
Package: *General Issues
PHP Version: All
Block user comment: N
Private report: N
New Comment:
> You can have XML files with PHP, for instance.
It's 2021, who's using XML? ;)
Surely it's possible to support both short open tags and XML..
But if somehow short open tags are deprecated / not recommended, IMO PHP should have an (optional?)
deprecation warning when you're still using them.
Previous Comments:
------------------------------------------------------------------------
[2021-03-04 12:27:51] cmb@php.net
> what's the benefit of short_open_tags = false?
You can have XML files with PHP, for instance.
------------------------------------------------------------------------
[2020-11-23 09:37:35] olafvdspek at gmail dot com
Thinking about this.. what's the benefit of short_open_tags = false?
Maybe the default should be short_open_tags = true instead?
If short open tags are bad, what about a run-time warning for them?
------------------------------------------------------------------------
[2019-01-02 09:27:51] nikic@php.net
@olafvdspek It only changes the default. The ini setting still wins in the end.
I've sent a mail to internals regarding this issue: https://marc.info/?l=php-internals&m=154642087106001
------------------------------------------------------------------------
[2019-01-02 09:22:02] olafvdspek at gmail dot com
Does --disable-short-tags 'only' change the default or does it disable short tags
unconditionally, even if short_open_tags = true in the .ini?
------------------------------------------------------------------------
[2019-01-02 09:16:38] nikic@php.net
The summarize the current situation, because it's rather odd:
* In both php.ini-production and php.ini-development short_open_tag is off.
* The default value (without ini) is short_open_tag=on *unless* --disable-short-tags has been
specified during ./configure. On Windows there doesn't seem to be an equivalent for
--disable-short-tags, so on Windows the default is always on.
I agree that the current situation is quite odd. It would probably make sense to make
short_open_tag=off the default and convert --disable-short-tags into --enable-short-tags for people
who would like to influence the default.
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=77378
--
Edit this bug report at https://bugs.php.net/bug.php?id=77378&edit=1