ID: 29029
Updated by: [EMAIL PROTECTED]
Reported By: tomas_matousek at hotmail dot com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: WinXP
PHP Version: 5.0.0RC3
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2004-09-10 05:36:18] [EMAIL PROTECTED]
This behaviour is expected, moving over as a documentation problem.
Casting Objects:
int - not able to cast
dobule - notice thrown, returns 1.0
null - returns null
bool - returns 1
string - user __toString() if applicable or 'Object'
ze1_compatibility_mode
casting object
int/float/bool - 1 or 0 signifying it has properties
------------------------------------------------------------------------
[2004-07-14 15:45:56] php at hristov dot com
php -r '$a= (float) new stdClass(); var_dump($a);'
gives float(1)
------------------------------------------------------------------------
[2004-07-06 14:59:38] tomas_matousek at hotmail dot com
Description:
------------
No description needed.
Reproduce code:
---------------
var_dump((int) new stdClass());
Expected result:
----------------
0
Actual result:
--------------
object(stdClass)#2 (0) {
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29029&edit=1