Skip to content

Tag: type-hinting

Type hinting with enumerations?

I’ve read here about enumarations and their “implementation” PHP and Enumerations point is, why use enums, when not for type hinting? but this implementation does not allow use for type hinting. Because the enum entries are all strings. is there a way I can say $a must be ‘foo’, …

JetBrains WebIDE: PHP variable type hinting?

Is there a way to hint WebIDE that a variable has some type? I have to iterate an array of objects, and there’s no auto-completion available. This helps in ZendStudio: I know there’s a feature in JetBrains to declare an array of objects: But this works only with function’s return type. Answe…