2012/2/24 Dmitri Snytkine <dsnytk...@ultralogistics.com> > In order to intoduce the enum into php, 'enum' will have to be a keyword > like 'class', 'interface', etc. > > Just a thought, but could there be a problem with using the new keyword > 'enum' in php. I don't think it's currently a reserved word, so it could > potentially cause problems if a script uses the word enum for existing > variable name or a function or a class name? >
It's true. "enum" is still not a reserved word. So yes, introducing native enum with this keyword would have this kind of side effect. I'll explain more the side effect: - it create a parse error - the world only is in trouble: "something_enum" or "enum_somthing" - it happens with function, method, class, interface ... names, but not variables, the "$" char save them - it happens a case-incensitive way -- Samuel DEAL samuel.d...@gmail.com