Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79683 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16597 invoked from network); 16 Dec 2014 01:19:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Dec 2014 01:19:18 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.42 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.42 mail-wg0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:39938] helo=mail-wg0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/60-13907-4988F845 for ; Mon, 15 Dec 2014 20:19:17 -0500 Received: by mail-wg0-f42.google.com with SMTP id z12so16255252wgg.15 for ; Mon, 15 Dec 2014 17:19:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type:subject:from:date:to :message-id; bh=BiaMcq00HyOWYyala2vE8TT4Jok8bcvwEzq6w7dRoJI=; b=VIJntOY+iMIkhVE8yAMXX0yzpm3vQ+0oeJZuYYwgK88IjExLs8HM8siGNhZIufEeM5 UN++0HjsAn97GMtb4NaaEaLdaUSowTD1ZLGDlK3KWcgCwJu7afyPIbhYYWm5dqPImTjY TJw3dlPqGSZLsu6zrFwWcyrCP1ya/6af0rsXwe8utd93y1hFdd/7o7VSVJLNyYk4ABZ9 u16kZoEGP2tPZXbOGMpLn93DVykCy5nRaaKgfZ7135cemcNDrEHMDwf+fxpuLcLTUCWB KLpYCcq1qTDvkso5YsA2CPfmUNdAfF9/2ki+LSN3ACTrwA8AKPAxObhd692izc8SqD7O lRbg== X-Received: by 10.194.179.166 with SMTP id dh6mr57195293wjc.87.1418692753705; Mon, 15 Dec 2014 17:19:13 -0800 (PST) Received: from [192.168.0.3] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by mx.google.com with ESMTPSA id bj7sm14944348wjc.33.2014.12.15.17.19.12 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Dec 2014 17:19:12 -0800 (PST) User-Agent: K-9 Mail for Android In-Reply-To: <78D1ECD9-3D6B-476B-8CBF-E57A583B125E@gmail.com> References: <78D1ECD9-3D6B-476B-8CBF-E57A583B125E@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Tue, 16 Dec 2014 01:19:10 +0000 To: PHP Internals Message-ID: <4C72B844-34C8-4B4A-A9F4-60DCE29B3E58@gmail.com> Subject: Re: [PHP-DEV] What ZEND_ACC_ALLOW_STATIC is supposed to do From: rowan.collins@gmail.com (Rowan Collins) On 16 December 2014 00:56:43 GMT, Tjerk Meesters wrote: >Hi, > >I was looking at the documentation for DOMDocument::loadHTML() [1] that >mentions the following: > >> This function may also be called statically to load and create a >DOMDocument object. The static invocation may be used when no >DOMDocument properties need to be set prior to loading. > >However, this can’t be done in strict mode [2]: > >> Strict Standards: Non-static method DOMDocument::loadHTML() should >not be called statically in … > >This behaviour seems to be intended when ZEND_ACC_ALLOW_STATIC is used >[3] and can be fixed by using ZEND_ACC_STATIC instead. > >My questions: > >1) Is that the right kind of fix? >2) Is ZEND_ACC_ALLOW_STATIC meant to be used only for BC? If not, why >are we raising strict errors? Surely that's just the same as a userland method which happens not to use $this ("allow static") and one marked "static" so *must* be called statically?