Created
November 13, 2017 11:38
-
-
Save zlikavac32/9419870d3a27c5722243c7866b61fd54 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| <?php | |
| class YesNo extends \SplEnum | |
| { | |
| const __default = self::YES; | |
| const NO = 0; | |
| const YES = 1; | |
| } | |
| $no = new YesNo(YesNo::NO); | |
| var_dump($no == YesNo::NO); //true | |
| var_dump(new YesNo(YesNo::NO) == YesNo::NO); //true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment