![]() |
CI 1.7: Will automatic short tags be deprecated? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: CI 1.7: Will automatic short tags be deprecated? (/showthread.php?tid=12579) |
CI 1.7: Will automatic short tags be deprecated? - El Forum - 10-24-2008 [eluser]MMacdonald[/eluser] 1.7 is a fantastic release that has fixed my 2 biggest annoyances. But I noticed a new style guide, which appears to drop hints that in the future we may see more "approved" 3rd party libraries. On the subject of short tags the style guide says the following: Quote:Short Open Tags However, the alternative PHP syntax page still suggests support for automatic short tags in those cases where the server does not have short_open_tag enabled. This seems an inconsistent message. My question is: will short tag support be deprecated in future versions? I personally like them, because they keep the code looking cleaner, but if they're generally considered bad practice, I'll welcome guidance on this. CI 1.7: Will automatic short tags be deprecated? - El Forum - 10-24-2008 [eluser]Yash[/eluser] why bad practice? I always like these short tags. CI 1.7: Will automatic short tags be deprecated? - El Forum - 10-24-2008 [eluser]xwero[/eluser] Short tags are a php.ini setting an this can be switched off. CI has a build-in parser for short tags but this slows down the page rendering. I think the idea behind that rule is to write code that works on every server. So if you still want to use short tags make sure you switch them on, on your server. You have to read the style guide as a guide and not as documentation. I think the use of incorrect and correct should be replaced by don't use and use. As you demonstrated the wording can confuse people. CI 1.7: Will automatic short tags be deprecated? - El Forum - 10-24-2008 [eluser]Pascal Kriete[/eluser] Quote:My question is: will short tag support be deprecated in future versions?More the other way around, actually. The style guide is copied from EE's developer guidelines. EE doesn't have the option to rewrite short tags, but it will (theoretically) when EE 2 comes out. I follow a pretty basic rule here. Long syntax for open source. Short tags if I can control the environment. CI 1.7: Will automatic short tags be deprecated? - El Forum - 10-24-2008 [eluser]Derek Allard[/eluser] I love reading threads when xwero and inparo have written. Always bang on... thanks guys. To be explicit, the guide is a guide which we tried to use to make people's code similar, but short tags are certainly fine. Short tag rewriting won't be deprecated in the near future. CI 1.7: Will automatic short tags be deprecated? - El Forum - 10-24-2008 [eluser]Yash[/eluser] ok I got the point.. I'll keep this in my mind for future while writing open sources.. CI 1.7: Will automatic short tags be deprecated? - El Forum - 10-25-2008 [eluser]Sarre[/eluser] [quote author="xwero" date="1224863241"]CI has a build-in parser for short tags but this slows down the page rendering.[/quote] Does this mean that a site coded using short tags will run slower than one coded with the full "echo" statements? And if so, is there a large difference in speed? CI 1.7: Will automatic short tags be deprecated? - El Forum - 10-25-2008 [eluser]xwero[/eluser] Sarre it depends on the rewrite_short_tags setting. If it's set to true all files will be checked for short tags. loader class snippet : Code: if ((bool) @ini_get('short_open_tag') === FALSE AND config_item('rewrite_short_tags') == TRUE) |