On 2011年4月26日星期二 at 上午10:31, David Muir wrote:
On 26/04/11 09:37, Ben Schmidt wrote:
> > > Back in PHP4 it was the only way to "simulate" an static call, but
> > > nowadays it really don't make sense at all.
> > >
> > > class Foo {
> > > static function toString(Bar $bar) {
> > > return 'Foo::to
On 26/04/11 09:37, Ben Schmidt wrote:
>> Back in PHP4 it was the only way to "simulate" an static call, but
>> nowadays it really don't make sense at all.
>>
>> class Foo {
>> static function toString(Bar $bar) {
>>return 'Foo::toString($bar)';
>> }
>> function toStrin
Back in PHP4 it was the only way to "simulate" an static call, but
nowadays it really don't make sense at all.
class Foo {
static function toString(Bar $bar) {
return 'Foo::toString($bar)';
}
function toString() {
return '$this->toString()';
}
}
$foo
On 25 April 2011 11:29, Reindl Harald wrote:
> nobody says "stop selling guns because somebody can shoot in his foot"
It'd be a place to start though.
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
--
PHP Internals - PHP Runtime Development Mailing
Martin Scotta
On Mon, Apr 25, 2011 at 4:52 AM, Alessandro Nadalin <
alessandro.nada...@gmail.com> wrote:
> 2011/4/24 Etienne Kneuss :
> > Hi,
> >
> > On Apr 24 22:13:47, Ángel González wrote:
> >> reeze wrote:
> >> > Hi,
> >> > I am not sure it's the right place to discuss this. someday I found
Am 25.04.2011 13:17, schrieb Alessandro Nadalin:
> peacefully talking, no need to be such aggressive
nobody is aggressive, maybe it sounds do for you because english
is not my native language and it is not always easy to make
a position clear in a foreign language in the same way as in
the nati
Hi Harald,
>>
>> 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:
>
> why should ANYTHING be dropped affection backward compatibility?
>
>> if you declare a method as static, you should be able to only call it
>> with a
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.
>> the method could rely on it). When you call a static method with ->, it
>
2011/4/24 Etienne Kneuss :
> Hi,
>
> On Apr 24 22:13:47, Ángel González wrote:
>> reeze wrote:
>> > Hi,
>> > I am not sure it's the right place to discuss this. someday I found I call
>> > a static method _instancely_.
>> > the method is just a helper method when reviewing my code. I know I do the