[TYPO3-core] Decisions and Changes to Coding Guidelines (CGL)

Stefan Neufeind typo3.neufeind at speedpartner.de
Thu Jan 30 19:46:39 CET 2014


On 01/30/2014 03:14 PM, Michiel Roos wrote:
> Can we make a note about using array access of variables when testing
> for the occurrence of a single character in a string?
> 
> Use this:
> $string{2} === 'a'
> 
> Instead of:
> strpos($string, 'a') === 2

Hi,

so far I used $string[2], not with curly brackets. Do we want to use
curly brackets to make clear that $string is not an array (and use the
square-brackets for arrays)? Or how do we handle that?


Regards,
 Stefan


More information about the TYPO3-team-core mailing list