Jump to content

<?php echo $a; ?> vs <?=$a?>


Recommended Posts

Even php.net recommends not using the <? and <?= since it results in non portable code that won't work unless the server is configured to recognize it.

 

The <? also creates a problem with xml in a .php file because the php parser is not smart enough to know that <?xml is not a short open <? tag.

 

And frankly, the short open tag was just a lazy way short cut that introduced two equivalent ways of doing the same thing, except one of the ways won't always work and one will always work.

Link to comment
https://forums.phpfreaks.com/topic/96850-vs/#findComment-495657
Share on other sites

ok thanks guys, one last question, whats up with the tutorials?

should we not have a tutorial idea thread or something where people can submit thier tutorials and the mods can review them and if appropriate they can move them into the tutorials section because i must say at the moment the tutorial section is a bit  pitiful....

Link to comment
https://forums.phpfreaks.com/topic/96850-vs/#findComment-496614
Share on other sites

ok thanks guys, one last question, whats up with the tutorials?

should we not have a tutorial idea thread or something where people can submit thier tutorials and the mods can review them and if appropriate they can move them into the tutorials section because i must say at the moment the tutorial section is a bit  pitiful....

The main site is currently going under complete reconstruction. The admins decided to import the current tutorials into the forum for now. Once the main site is relaunched all forums members will have access to publishing tutorials.

Link to comment
https://forums.phpfreaks.com/topic/96850-vs/#findComment-496655
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.