|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2017-12-12 03:20 UTC] carusogabriel34 at gmail dot com
Description: ------------ Discovered while trying to test cakephp/debug_kit against PHP 7.2 (https://travis-ci.org/cakephp/debug_kit/jobs/314694265#L553). Test script: --------------- $log = new ArrayObject; count($log); Expected result: ---------------- The count method should count and ArrayObject, as it implements Countable. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 01:00:02 2025 UTC |
Sorry requinix@php.net, this was my first bug report. Here's the code; <?php class Foo { protected $emailLog; public function initialize() { $this->emailLog = new ArrayObject; } public function summary() { return count($this->emailLog) === 0 ? '' : count($this->emailLog); } } $log = new Foo; $log->initialize(); $log->summary(); ?>