|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-01-21 12:38 UTC] trobinson at gksystems dot com
Description:
------------
php.ini contains the line:
short_open_tag = Off
phpinfo() reports that it is off.
Yet <? short tags are still being processed.
This causes problems for <?xml, forcing the ugly workaround.
Reproduce code:
---------------
The next line should never say "short_open_tag: 0"
<br>
<?
echo 'short_open_tag: ', (int) ini_get('short_open_tag');
?>
Expected result:
----------------
===EITHER===
The next line should never say "short_open_tag: 0"
short_open_tag: 1
(if short_open_tag = On)
===OR===
The next line should never say "short_open_tag: 0"
(in this case, the <? echo ...?> is visible in Reveal Source, but the browser correctly hides it.)
Actual result:
--------------
The next line should never say "short_open_tag: 0"
short_open_tag: 0
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 16:00:01 2025 UTC |
phpinfo() reports the correct php.ini file. However, regardless of php.ini setting, the following line should NEVER outout 0. It should either outout 1 or it should not execute at all. <?= (int) ini_get('short_open_tag') ?>what does var_dump(ini_get('short_open_tag')) say?var_dump(ini_get('short_open_tag')) with short_open_tag = Off: string(0) "" with short_open_tag = On: string(1) "1"c:\php> cli\php <? var_dump(ini_get('short_open_tag')) ?> ^Z string(0) "" So same problem with CLI version. I tried with 4.3.1 on the same machine, and it works correctly.