clearPHP
clearPHP copied to clipboard
Reference for writing clear PHP code
I'd recommend to alter the recommendation to always sort by key rather than an array_reverse. Example: https://3v4l.org/scmZ8
In https://github.com/dseguy/clearPHP/blob/master/rules/use-smart-autoload.md example: function my_autoloader($class) { include 'classes/' . $class . '.class.php'; } For every include that fail, will generate a warning and increase your log. If you have 4...
When going through everything, I noticed that these two are essentially the same. If they are not (supposed to be), then maybe the difference between the two rules should be...
Currently are all examples, pattern without space between brackets and var. I think is also a good practice to write readable code. Maybe I would check all examples for this...
On the [Commented Fallthrough](https://github.com/dseguy/clearPHP/blob/master/rules/commented-fallthrough.md) page, the "warnings" and "legit" examples should be reversed.
While you have linked to Nikita's article [Disproving the Single Quotes Performance Myth](https://nikic.github.com/2012/01/09/Disproving-the-Single-Quotes-Performance-Myth), your advice is still incredibly generalized and not entirely accurate. I wrote this up on [PHP The...