ID: 36422 User updated by: tomas_matousek at hotmail dot com Reported By: tomas_matousek at hotmail dot com Status: Open Bug Type: Documentation problem Operating System: WinXP PHP Version: 5.1.2 New Comment:
An what is it if it is not an object? Array? Some new PHP type? So, why var_dump reports is as object? This: var_dump(gettype($o)); var_dump($o->__PHP_Incomplete_Class_Name); displays: string(6) "object" NULL Previous Comments: ------------------------------------------------------------------------ [2006-02-16 20:59:07] [EMAIL PROTECTED] This is expected, as object of __PHP_Incomplete_Class is actually not valid object. Reclassified as docu problem. ------------------------------------------------------------------------ [2006-02-16 20:36:56] tomas_matousek at hotmail dot com Description: ------------ When unserialize calls __autoload() and this dosn't load the required class unserialize returns an object that doesn't behave like object; var_dump displays it as an object but is_object gives false. Reproduce code: --------------- function __autoload($class_name) { } var_dump($o = unserialize('O:1:"X":0:{}')); var_dump(is_object($o)); Expected result: ---------------- object(__PHP_Incomplete_Class)#1 (1) { ["__PHP_Incomplete_Class_Name"]=> string(1) "X" } bool(true) Actual result: -------------- object(__PHP_Incomplete_Class)#1 (1) { ["__PHP_Incomplete_Class_Name"]=> string(1) "X" } bool(false) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36422&edit=1