Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52005 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33731 invoked from network); 25 Apr 2011 10:29:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Apr 2011 10:29:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=h.reindl@thelounge.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=h.reindl@thelounge.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain thelounge.net designates 91.118.73.15 as permitted sender) X-PHP-List-Original-Sender: h.reindl@thelounge.net X-Host-Fingerprint: 91.118.73.15 mail.thelounge.net Windows 98 (1) Received: from [91.118.73.15] ([91.118.73.15:54722] helo=mail.thelounge.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DD/DC-22678-21D45BD4 for ; Mon, 25 Apr 2011 06:29:38 -0400 Received: from srv-rhsoft.rhsoft.net (openvpn-241.thelounge.net [10.0.0.241]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.thelounge.net (Postfix) with ESMTPSA id 8D6B891 for ; Mon, 25 Apr 2011 12:29:35 +0200 (CEST) Message-ID: <4DB54D0F.7010601@thelounge.net> Date: Mon, 25 Apr 2011 12:29:35 +0200 Organization: the lounge interactive design User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110421 Fedora/3.1.9-2.fc14 Lightning/1.0b3pre Thunderbird/3.1.9 MIME-Version: 1.0 To: internals@lists.php.net References: <5870D50E38AE4374833F83A59ABFB59E@gmail.com> <4DB4847B.3080004@gmail.com> <20110424202353.GC21102@crousti> In-Reply-To: X-Enigmail-Version: 1.1.2 OpenPGP: id=7F780279; url=http://arrakis.thelounge.net/gpg/h.reindl_thelounge.net.pub.txt Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF73408F82A157ACAF79FA3F4" Subject: Re: [PHP-DEV] Call non-static method staticly raise E_STRICT, but why call a static method instancely won't From: h.reindl@thelounge.net (Reindl Harald) --------------enigF73408F82A157ACAF79FA3F4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Am 25.04.2011 09:52, schrieb Alessandro Nadalin: >> Nothing wrong with it. >> >> The E_STRICT is raised because when you call a non-static method >> statically, $this will not be defined and that could be a problem (e.g= =2E >> the method could rely on it). When you call a static method with ->, i= t >> remains a static call, $this will not be defined anyway, and there is >> absolutely no problem with it. >=20 > I can see your point, but I think we should drop this "feature" not to > let developers have N ways of doing the same things:=20 why should ANYTHING be dropped affection backward compatibility? > if you declare a method as static, you should be able to only call it=20 > with a static call, not hrough an object. that is a opinion, but not enough to damage BC > PHP usually lets you do the same thing in a few ways, and that's a bit > frustrating there are so naby different woman and cars out there and that's a bit frustrating - you know what i mean? > because we should force some kind of best practices for > the language: not .advise, but *force* maybe you are using the wrong language if this is your opinion? nobody says "stop selling guns because somebody can shoot in his foot" --------------enigF73408F82A157ACAF79FA3F4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAk21TQ8ACgkQhmBjz394AnkV9gCfX/XpjOmpsnt7xJJncAR4MWkK 4IsAni0Czt9ux6qXR27PilLLq1fKgwer =7mMD -----END PGP SIGNATURE----- --------------enigF73408F82A157ACAF79FA3F4--