devel/php5-spl: Countable is ineffective

Roman Neuhauser neuhauser at sigpipe.cz
Mon Feb 12 15:20:08 UTC 2007


Hello,

I have PHP 5.2.1 w/ SPL compiled from ports (lang/php5, devel/php5-spl),
and it appears Countable is ineffective (the count() method is not
called).  5.2.1 with SPL compiled in works.

Can anyone confirm this problem?

roman at dagan ~ 1019:0 > cat tmp/count.php 
<?php

class fubar
implements Countable
{
    function count()
    {
        return 0;
    }
}

var_dump(sizeof(new fubar));
roman at dagan ~ 1020:0 > php tmp/count.php
int(1)
roman at dagan ~ 1021:0 > /opt/bin/php521 tmp/count.php
int(0)
roman at dagan ~ 1022:0 > php -m
[PHP Modules]
ctype
date
dom
libxml
pcntl
pcre
posix
Reflection
SimpleXML
SPL
standard
xml
zlib

[Zend Modules]

roman at dagan ~ 1023:0 > php -v
PHP 5.2.1 (cli) (built: Feb 10 2007 12:19:25) 
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
roman at dagan ~ 1024:0 > /opt/bin/php521 -m
[PHP Modules]
ctype
date
pcre
Reflection
SPL
standard

[Zend Modules]

roman at dagan ~ 1025:0 > /opt/bin/php521 -v
PHP 5.2.1 (cli) (built: Feb 10 2007 13:20:02) 
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991


More information about the freebsd-ports mailing list