Closed vianetz closed 11 years ago
Hi Chris,
Thanks for opening this issue. As follows from the announce on PHP official website (http://php.net/archive/2013.php#id2013-07-11-1), all users of PHP are encouraged to upgrade to PHP 5.4 or PHP 5.5 as the older versions will be no longer supported (except security bugfixes). As developers we try to be proactive and promote newer versions of PHP (5.4, 5.5) which enable you to write simpler and safer code. And we love these new beautiful PHP features like array dereferencing, traits, generators and so on.
I specified the minimum required PHP version in the requirements section of the readme file.
Best regards, Alex Zarichnyi
Hi Alex,
thanks for your fast reply.
You're totally right, I was just too lazy to upgrade yet ;-)
Have a nice day, Chris
Hi,
the direct array dereference (e.g. $phpcs->getTokens()[$next]['content']) is only possible from PHP 5.4 up and should be replaced with temporary variables for lower PHP versions. (Source: http://php.net/manual/en/language.types.array.php#example-88)
Best regards, Chris