ID: 33795 Updated by: [EMAIL PROTECTED] Reported By: scott at slerman dot net -Status: Open +Status: Closed Bug Type: Documentation problem PHP Version: Irrelevant New Comment:
This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. "Since PHP 5, obj is optional if called from the object's method." Previous Comments: ------------------------------------------------------------------------ [2005-07-21 05:33:18] [EMAIL PROTECTED] Seems this changed in PHP 5: [EMAIL PROTECTED]:~$ php -r 'class Foo { function bar() { echo get_class(); } } Foo::bar();' Warning: Wrong parameter count for get_class() in Command line code on line 1 [EMAIL PROTECTED]:~$ php5 -r 'class Foo { function bar() { echo get_class(); } } Foo::bar();' I'd guess as part of #9, here: http://cvs.php.net/co.php/php-src/README.PHP4-TO-PHP5-THIN-CHANGES S ------------------------------------------------------------------------ [2005-07-21 05:12:48] scott at slerman dot net Description: ------------ The manual lists the function declaration as string get_class ( object obj ) In fact, the argument is optional. If no argument is given, get_class returns the name of the class that the current method is defined in (returning the parent class if the method is called as part of a child class). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33795&edit=1