Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52399 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23995 invoked from network); 16 May 2011 18:14:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 May 2011 18:14:07 -0000 Authentication-Results: pb1.pair.com header.from=andrewcurioso@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=andrewcurioso@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: andrewcurioso@gmail.com X-Host-Fingerprint: 209.85.220.170 mail-vx0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:58941] helo=mail-vx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 18/7E-26716-E6961DD4 for ; Mon, 16 May 2011 14:14:07 -0400 Received: by vxb40 with SMTP id 40so4049554vxb.29 for ; Mon, 16 May 2011 11:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=f7799GltW+wZIi5WsNJbXv1Tw9Lpxz7k9ZCNepMkp5s=; b=xDwEPXp0SzqzVcvUkN+6Qb0veVEACLdK+9iTP/dnQhaegqXVxtsIYGu9B8ahZ3iUhB TJtU+xA0HtlcqTwKipFtBGhqUyok4DJb9wTYnWzEv5XiOpKSEw6VW+OqsYTUajvxDRMj 1L9vnHU5TXQbqOgv0SZ0dJTK/BsYE+GVEgg8s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=v01dF2vbtydTIr0ihZlqTrbcbytPuH4F3E4xaiRRmVFQGzv8vASvbgZbA6f8P8inrb YGIXxXvAkjjaBGy+tN5Z4fP8qIQgMo9pSfv5Swbg6UXnuZecF9TOTQ15iTIuDkdBzIFL sUzCCkCqOVsqliKEXKO0vZsDmD02DMBEF/eKE= MIME-Version: 1.0 Received: by 10.52.111.231 with SMTP id il7mr6425852vdb.58.1305569644527; Mon, 16 May 2011 11:14:04 -0700 (PDT) Received: by 10.52.101.167 with HTTP; Mon, 16 May 2011 11:14:04 -0700 (PDT) Date: Mon, 16 May 2011 14:14:04 -0400 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=bcaec5486262e4408904a3689ed4 Subject: Inconsistencies with constructors in SPL From: andrewcurioso@gmail.com (Andrew Curioso) --bcaec5486262e4408904a3689ed4 Content-Type: text/plain; charset=ISO-8859-1 So, I ran across bug #54631 A fatal error is thrown if you try to call parent::__construct() from a subclass of SplObjectStorage. I was going to close it as "expected behavior" since that is pretty normal if the parent class doesn't implement __construct(). Also, the docs don't list it as having a __construct() method. But then look at SplDoublyLinkedList (and a bunch of others). They are documented as having a __construct() method, yet it triggers a fatal error when you try to call "parent::__construct()" from a subclass' constructor . So it seems to me that there are two possible solutions: - Update the docs to remove ::__construct() for classes that don't have one. - Make sure __construct() is implemented in all SPL classes * and update the docs. * Even if it is empty. What's everyone thinking? I'd be more than happy to add the constructors to the code where needed, I just want to make sure that it is the right move first. - Andrew --bcaec5486262e4408904a3689ed4--