PHP 4.0 Bug #7986: Behavior of settype inconsistent with behavior of type casting constructs
| From: | zak@php.net | Date: | Mon, 27 Nov 2000 05:11:27 +0000 |
| Subject: | PHP 4.0 Bug #7986: Behavior of settype inconsistent with behavior of type casting constructs | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-39181@lists.php.net to get a copy of this message | ||
From: zak@php.net
Operating system: Win2k Pro. / Mandrake Linux 7.1
PHP version: 4.0.3pl1
PHP Bug Type: Variables related
Bug description: Behavior of settype inconsistent with behavior of type casting constructs
The behavior of the settype() function is inconsistent with the behavior of the type casting
constructs (like (int), (double), etc...)
For example:
print settype ("foo", "integer"); // displays 1
print (int) "foo"; // displays 0
This behavior is confirmed on Win2k and Mandrake Linux running PHP 4.0.3pl1
--
Edit Bug report at: http://bugs.php.net/?id=7986&edit=1