PHP Enumeration Constant Reflection


/ Published in: PHP
Save to your folder(s)

Proper enumerations in PHP are hard to come by. This uses a class as a pseudo enumeration. Sometimes you'll want to lookup the string name side of the enum when you have the value (ie, you have "1" and you want the string "Flood").

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.