Welcome Guest, Not a member yet? Register   Sign In
<?=$item ?> or <?php echo $item;?> witch is faster ?
#13

[eluser]Daniel Moore[/eluser]
Another thing to think about on this... Not everyone is using CI. If you land a freelancing job installing a 3rd party script on an even different 3rd party server that does not enable short tags, then you'll see why I hate the use of short tags. I have had to work to fix a few other people's non-CI code on several occasions, because they used short tags and it wasn't enabled on a server it needed to be installed on.

I for one don't like to go through every line of code, especially when, in some cases, there are several hundred files and hundreds of thousands of lines of code, just to fix these short tag issues.

I wrote a nifty little PHP script, that when placed in an URL on the server, will search every file in that path, and search all sub-directories as well, locating every PHP file and changing all the short tags to long tags. It handles &lt;?, &lt;?=, <%, and <%= conversion beautifully. It will also check to make sure it doesn't work on itself, and it will also check to make sure it doesn't mess with the Loader.php that comes in the CI Core. (It makes sure a file named "Loader.php" is actually a CI file, though, by looking at the first few lines of the file.)

I don't imagine there are many people that would be interested in such a script, but if you are interested in it, I'll be happy to post it.


Messages In This Thread
&lt;?=$item ?&gt; or &lt;?php echo $item;?&gt; witch is faster ? - by El Forum - 01-27-2011, 09:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB