Re: com php-src: Fix bug #67064 => Countable interface inconsistency

From: Date: Wed, 23 Jul 2014 08:26:07 +0000
Subject: Re: com php-src: Fix bug #67064 => Countable interface inconsistency
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-75925@lists.php.net to get a copy of this message
Notice, All Internal classes, implementing Countable still doesn't accept this optional parameter. Ex: Method [ <internal:SPL, prototype Countable> public method count ] { - Parameters [0] { } Indeed, all Spl classes still use zend_parse_parameters_none(). This work, because count($a) doesn't use the method, but the count_elements handler. If a internal class doesn't implement the handler, it will be hit by this change. Both solution "should" fix this: - adding the count_elements handler - accepting the optional mode But, Reflection still not correct, and count($a) still raise the Warning: Imagick::count() expects exactly 0 parameters, 1 given in /work/GIT/imagick/tests/021-countable.phpt on line 19 I think this is not consistent (internal vs userland) Remi. P.S. discovered on imagick See: https://github.com/mkoppanen/imagick/pull/35

« previous php.internals (#75925) next »