#33795 [Opn]: get_class argument not listed as optional
| From: | sean@php.net | Date: | Thu, 21 Jul 2005 03:33:19 +0000 |
| Subject: | #33795 [Opn]: get_class argument not listed as optional | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969369261@lists.php.net to get a copy of this message | ||
ID: 33795
Updated by: sean@php.net
Reported By: scott at slerman dot net
Status: Open
Bug Type: Documentation problem
PHP Version: Irrelevant
New Comment:
Seems this changed in PHP 5:
sean@iconoclast:~$ 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
sean@iconoclast:~$ 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
Previous Comments:
------------------------------------------------------------------------
[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