[PHP-DEV] PHP 4.0 Bug #6741 Updated: gettype of 'user function' returns null From: Bug Database (php-dev <email protected>)
Date: 09/23/00

ID: 6741
Updated by: stas
Reported By: ping <email protected>
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 <email protected>
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 <email protected>
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 <email protected>
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

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>