Is it possible to use SplEnum in php 5.2.6?

后端 未结 1 1093
野的像风
野的像风 2021-01-12 05:55

I tried to use class :

abstract class my_abstractEnum extends SplEnum {
...
}

and

class my_categoryEnum extends my_abstract         


        
相关标签:
1条回答
  • 2021-01-12 06:09

    SplTypes is an experimental PECL Extension. You have to install it with pecl install SPL_Types from the command line. There is no DLL for windows, so you are limited to Linux (or have to build your own).

    An alternative in userland can be found in http://www.whitewashing.de/2009/08/31/enums-in-php.html

    0 讨论(0)
提交回复
热议问题