ID: 36422
Updated by: [EMAIL PROTECTED]
Reported By: tomas_matousek at hotmail dot com
Status: Open
-Bug Type: Class/Object related
+Bug Type: Documentation problem
Operating System: WinXP
PHP Version: 5.1.2
New Comment:
This is expected, as object of __PHP_Incomplete_Class is actually not
valid object.
Reclassified as docu problem.
Previous Comments:
------------------------------------------------------------------------
[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