Bug #60697 [Opn->Bgs]: gettype() cann't distinguish object and function?
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)