PHP 4.0 Bug #6741 Updated: gettype of 'user function' returns null
| From: | Bug Database | Date: | Sun, 24 Sep 2000 02:26:27 +0000 |
| Subject: | PHP 4.0 Bug #6741 Updated: gettype of 'user function' returns null | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-33681@lists.php.net to get a copy of this message | ||
ID: 6741
Updated by: stas
Reported By: ping@alt.it
Status: Analyzed
Bug Type: Documentation problem
Assigned To:
Comments:
I don't see any mention in the manual that gettype should work on functions - only on
variables. In fact, it cannot veen return "user function" now, so I put it in doc's
problem.
Previous Comments:
---------------------------------------------------------------------------
[2000-09-20 05:23:16] ping@alt.it
It WAS undocumented but working on php3.
It IS documented and doesn't work on php4
<?
class class1
{
function classfunction1()
{
$b=2;
}
}
$myclass=new class1;
echo "classfunction1 is of type ",
gettype($myclass->classfunction1),"<br>n";
?>
---------------------------------------------------------------------------
[2000-09-16 18:21:49] stas@php.net
Please provide a code example.
Also, I guess you should never rely on undocumented behaviour to preserve, anyway.
---------------------------------------------------------------------------
[2000-09-13 19:16:44] ping@alt.it
gettype() on function names returns null
Although undocumented, in version 3 it properly returned 'user function'.
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=6741