ID: 40886 Updated by: [EMAIL PROTECTED] Reported By: andrea at 3site dot it -Status: Feedback +Status: Bogus Bug Type: Class/Object related Operating System: Windows XP SP2 PHP Version: 5.2.1 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: ------------------------------------------------------------------------ [2007-03-22 12:15:28] [EMAIL PROTECTED] Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. ------------------------------------------------------------------------ [2007-03-22 11:29:22] daniele_dll at yahoo dot it Hi, i was talking with andrea yesterday evening and he was explaining me that stuff. I don't know if it is an expected behaviour or not, but i'm sure that somewhere there is a problem! Infact, if it is an expected behaviour the static keyword loss it meanings and, probably, slowdown the php page compilation/execution, but if it is normal documentation should be fixed because it says a totally different stuff. However, to get back to the problem, the manual says, as should be: "A member declared as static can not be accessed with an instantiated class object" Because is a non sense say that something is static and after let to the code to call it as non static ------------------------------------------------------------------------ [2007-03-22 11:19:48] andrea at 3site dot it This cannot be an expected behaviour because in this way a static method is exactly the same of a generic public method. Static parameters aren't (correctly) usable with instances so why static methods should be assigned? If this is an expected behaviour please tell us what do You think static keyword means and explain them correctly on documentation page. ------------------------------------------------------------------------ [2007-03-21 21:02:53] [EMAIL PROTECTED] Expected behaviour. ------------------------------------------------------------------------ [2007-03-21 20:13:21] andrea at 3site dot it damn ... http://www.php.net/manual/en/language.oop5.static.php "Declaring class members or methods as static makes them accessible without needing an instantiation of the class. A member declared as static can not be accessed with an instantiated class object (though a static method can)." Well ... C# and other languages doesn't assign static methods to instances. C++ does it but it assign static parameters too. With PHP 5 we can't use the same name for 2 different methods (for example one static and one public) but we can call a static method without static declaration (only E_STRICT tells us there's something wrong) while C++ can't call a public method, or parameter, with a class if it's not declared as static. At this point, why did You introduce the static method/property type? This implementation is not Object Oriented, it's quite "Hilarius" Oriented. Sorry for this bug (and for me it's really a bug!). Regards. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/40886 -- Edit this bug report at http://bugs.php.net/?id=40886&edit=1
