[PHP] ショートタグ
short_open_tag = on
short_open_tag = on
は, <?php
を<?
で始められるようにするための, php.iniの設定.
short_open_tag = off
が推奨であるのは, XMLの記法である<? ?>
が誤動作する可能性を排除するためである.
現状でもshort_open_tag = off
が推奨されている.
ショートタグ
<?=
は<?php echo
のショートタグで, PHP 5.4.0以降, short_open_tag
の設定に関わらず有効である.
すなわち, 非推奨であるshort_open_tag = on
に影響されず, 開始タグを省略して記述できる.