Re: fatal static call in php 6.0?

From: Date: Thu, 25 May 2006 22:08:46 +0000
Subject: Re: fatal static call in php 6.0?
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.internals 
Request: Send a blank email to internals+get-23669@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 Edin Kadribasic wrote: > Jasper Bryant-Greene wrote: >> Christian Schneider wrote: >> >>> PS: There are no plans to make non-static calls to static methods >>> illegal, right? >> >> What is the point in that? What advantage do you get using >> $this->someMethodName() [non-static call] over self::someMethodName() >> [static call]? > > You don't need to create an object to make a static call. > MyClass::MyFunc() works without objects, which is much faster than > creating an instance and then invoking a method on it. Exactly. You just gave an advantage of calling a static method using a static call over a non-static call. Now back to my original question, which actually relates to the OP's question: what advantage do you get calling a static method using a non-static call over a static call? - -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM jasper@album.co.nz 021 708 334 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (MingW32) iD8DBQFEdiruFfAeHhDzT4gRAwrJAKDvomdAlns/khNuwFDMMKcZXuT9DACgme9b /S4/8LUgYSL/Nsex8akNFaY= =ykGX -----END PGP SIGNATURE-----

« previous php.internals (#23669) next »