2011-07-27 14:49 阅读 40

可以在php 5.2.6中使用SplEnum吗?

I tried to use class :

abstract class my_abstractEnum extends SplEnum {


class my_categoryEnum extends my_abstractEnum {

and I have :

Fatal error: Class 'SplEnum' not found

I work on PHP 5.2.6. SplEnum is for php > 5.3 ? I don't see so in the documentation ...

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • 已采纳
    douji5746 douji5746 2011-07-27 14:55

    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

    点赞 评论 复制链接分享