Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Having a look at "Coding Best Practices for GetSimple"
#2
Actually its just old, gs still supports a min of 5.2, so avoid short tags always.

The ternary warning is strange but I assume it is for maintainability.
It is easier to modify if its already an if statement,I typically wind up converting ternaries to if blocks when i find I need to add more complexity to the logic. So why not do it to begin with. Of course using it for a simple boolean or conversion or substiution of empty chars is fine, but there are times when it it advised against. Certain constructs will be evaluated twice, making it less efficient.

single vs double is a micro optimization. And it's actually worse to concat several strings in a echo statement, even though that suggests its better.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply


Messages In This Thread
RE: Having a look at "Coding Best Practices for GetSimple" - by shawn_a - 2013-02-11, 10:59:27



Users browsing this thread: 1 Guest(s)