2013-02-11, 10:59:27
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.
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.