Created
March 14, 2013 01:41
-
-
Save galen/5158144 to your computer and use it in GitHub Desktop.
Enums in PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DaysOfWeek | |
{ | |
const Sunday = 0; | |
const Monday = 1; | |
const Tuesday = 2; | |
const Wednesday = 3; | |
const Thursday = 4; | |
const Friday = 5; | |
const Saturday = 6; | |
} | |
echo DaysOfWeek::Friday; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment