RE: [PHP-DEV] Static and non-static methods

From: Date: Fri, 04 Apr 2003 15:08:44 +0000
Subject: RE: [PHP-DEV] Static and non-static methods
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-662@lists.php.net to get a copy of this message
>What does everyone think about disallowing non-instance calls >to methods which are not declared static? Currently, this works: I like the idea, but wouldn't that cause some problems with BC? -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- John Coggeshall john at coggeshall dot org http://www.coggeshall.org/ -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- >-----Original Message----- >From: Andrei Zmievski [mailto:andrei@gravitonic.com] >Sent: Friday, April 04, 2003 9:53 AM >To: PHP Internals; engine@lists.zend.com >Subject: [PHP-DEV] Static and non-static methods > > >What does everyone think about disallowing non-instance calls >to methods which are not declared static? Currently, this works: > > class A { > function B() { return 1; } > } > > A::B(); > >But really, if B was intended to be used that way, it should >have been declared as static. > >-Andrei >http://www.gravitonic.com/ >* If it ain't broken, it doesn't >have enough features yet. * > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.internals (#662) next »