#35738 [Opn->Bgs]: how to declare a non static method
| From: | derick@php.net | Date: | Tue, 20 Dec 2005 07:25:08 +0000 |
| Subject: | #35738 [Opn->Bgs]: how to declare a non static method | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-90693@lists.php.net to get a copy of this message | ||
ID: 35738
Updated by: derick@php.net
Reported By: sqchen at citiz dot net
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: redhat 7.3
PHP Version: 5.1.1
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
.
Previous Comments:
------------------------------------------------------------------------
[2005-12-20 05:24:43] sqchen at citiz dot net
Description:
------------
as php manual says:
http://www.php.net/manual/en/language.oop5.static.php
if a method is declared as just public, it will be no static method,
right? it not, how to declared a no static method
Reproduce code:
---------------
<?php
class A{
public function foo(){ //no static method?
echo "[foo]\n";}
}
public static function static_foo(){//static method?
echo "[static_foo]";}
}
A::foo(); //[foo]
A::static_foo(); //[static_foo]
?>
Expected result:
----------------
warning:
[static_foo]
Actual result:
--------------
[foo]
[static_foo]
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35738&edit=1