#29029 [Com]: Object to integer typecast is incorrect

From: Date: Wed, 14 Jul 2004 13:45:57 +0000
Subject: #29029 [Com]: Object to integer typecast is incorrect
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-62245@lists.php.net to get a copy of this message
ID: 29029 Comment by: php at hristov dot com Reported By: tomas_matousek at hotmail dot com Status: Open Bug Type: Zend Engine 2 problem Operating System: WinXP PHP Version: 5.0.0RC3 New Comment: php -r '$a= (float) new stdClass(); var_dump($a);' gives float(1) Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#62245) next »