As per PSR-1 specifications, class names must be in StudlyCaps.


However, if I want to define a class named Echo (or any other Php keyword), 
I am not able to do that beacuse if I do so I obtain a parse error.


It seems that the standard solution to this issue is to add an _ at the end 
of the class, as in Echo_.

For example, look in 
https://github.com/nikic/PHP-Parser/tree/3.x/lib/PhpParser/Node/Stmt.


Should this be counted as a violation of PSR-1?

Could it be the case to state this explicitely in PSR-12, allowing the 
presence of a final underscore in a class name, maybe only when the class 
name in a reserved keyword?


More broadly, could it be the case to provice a precise definition of what 
StudlyCaps mean? (If it's not present elsewhere and I'm missing it...)

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/e07dbe3c-2488-4630-8850-bdb04ccae52b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to