Open gRegorLove opened 6 years ago
I would vote for camel case
I would vote for whatever the majority of the code is currently written in
I too would vote camelCase. The PSR uses camelCase in almost all of its examples. Symfony defines camelCase in their coding standards. So did Zend (and they will automatically test for it in the future). There are probably a few more big projects that could be added to this list.
(To this day I am a little surprised the PSR have not documented naming conventions. Not even the upcoming PSR-12 Extended Coding Style Guide.)
I think what will be more important for a coding standard is to pick something that is automatically testable (PHP_CodeSniffer) and preferably automatically fixable (PHP_CodeSniffer or PHP CS Fixer).
https://www.php-fig.org/psr/psr-1/ and https://www.php-fig.org/psr/psr-2/
In addition, should make a choice among
$StudlyCaps
,$camelCase
, or$under_score
properties. Historically php-mf2 has used$camelCase
so I'm fine with that.