tags:

views:

237

answers:

4
<h2>Manage Role: > (<?= $myACL->getRoleNameFromID($_GET['roleID']); ?>)</h2>
+5  A: 

It's functionally the same as <?php echo $myACL->getRoleNameFromID($_GET['roleID']); ?>

Mark Biek
+3  A: 

It's the PHP Short Tag equivalent of printing.

From the PHP INI:

Using short tags is discouraged when developing code meant for redistribution ; since short tags may not be supported on the target server.

See "Are PHP Short Tags Acceptable to Use?" on StackOverflow.

Jonathan Sampson
A: 
The <?= ... > tag says to execute whatever is in ... and output the results.
Milan Ramaiya
+7  A: 

To add to Mark's answer: The short_tags option must be enabled for the <?= syntax to be valid. This presents a major portability problem when moving to a server that has this option disabled.

See the PHP Manual for more info on short tags

Mike B
Couldn't the user simply call `ini_set('short_open_tag', 1)` to override? Or if short tags are disabled, is the `ini_set` function normally disabled as well?
Doug Neiner
@Doug: actually, by the time the user was allowed to call `ini_set`, the file was already parsed. So it's too late at that point. The best alternative is a directive in `.htaccess` or `httpd.conf` if you can.
gahooa
Doh! Of course. Thanks for the response @gahooa!
Doug Neiner