6
In PHP what this tag represents ?
Opening tag:
<?=
Closing tag:
?>
6
In PHP what this tag represents ?
Opening tag:
<?=
Closing tag:
?>
10
This syntax is a shortcut to this:
<?php echo ; ?>
Before PHP 5.4 the option short tags should be enabled to use this shortcut. In PHP 5.4 this option is always available.
So much so that this syntax is specified in echo documentation.
Example:
<p>Meu nome é <?=$nome?></p>
amounts to
<p>Meu nome é <?php echo $nome; ?></p>
Before this change of PHP 5.4, the use of echo
implicit was problematic as the short opening tags <? ?>
are confused with XML instructions, and usually hosts in general keep this option off.
As the sign of =
would serve in theory for disambiguation in these cases, it was decided to enable this option separately from the configuration of short tags.
3
This Directive also affects the abbreviated form <?=
previous to PHP 5.4.0, which is the same as <? echo
. This abbreviation requires short_open_tag to be active. Since PHP 5.4.0, <?=
is always available.
Reference of: http://php.net/manual/en/ini.core.php#ini.short-open-tag
Browser other questions tagged php
You are not signed in. Login or sign up in order to post.