Mike Borrelli wrote:
Good day,
While I've been using php for more than a little while now, I've never
understood why the use of the "<?= ...?>" short tag is noted "to be
avoided".
Or rather, I understand that there's an option to disable it, and that's
why it's noted in this way, but I don't understand why it's disabled?
What's gained by writing <?php echo some_function(); ?> over <?=
some_function(); ?>
Thanks in advance.
Cheers,
Mike
Structurally, there is a far better way to compile your html pages. This approach is easier to design and debug and it
is faster since it sends one complete packet instead of one for every short tag. And, it saves using ob_start() and
ob_flush().
Consider:
$report= '';
$report .= function() [or whatever]
..... repeat as necessary to assemble your complete page.
Then simply
echo $report;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php