Bug #60697 [Opn->Bgs]: gettype() cann't distinguish object and function?

From: Date: Tue, 10 Jan 2012 08:20:51 +0000
Subject: Bug #60697 [Opn->Bgs]: gettype() cann't distinguish object and function?
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-166315@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60697&edit=1

 ID:                 60697
 Updated by:         cataphract@php.net
 Reported by:        hfcorriez at gmail dot com
 Summary:            gettype() cann't distinguish object and function?
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   all
 PHP Version:        5.3.8
 Block user comment: N
 Private report:     N

 New Comment:

"function" is not a type. See http://php.net/manual/en/language.types.php


Previous Comments:
------------------------------------------------------------------------
[2012-01-10 05:25:13] hfcorriez at gmail dot com

Description:
------------
I create a lambda function with a variable, then check it type with gettype , it's 
return "object", It think it's not good in here.

Test script:
---------------
$a = function(){}; 
$b = new stdClass();
echo gettype($a) . '|' . gettype($b); // echo 'object|object'



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60697&edit=1


Thread (4 messages)

« previous php.bugs (#166315) next »