PHP 4.0 Bug #7986 Updated: Behavior of settype inconsistent with behavior of type casting constructs

From: Date: Mon, 27 Nov 2000 05:26:09 +0000
Subject: PHP 4.0 Bug #7986 Updated: Behavior of settype inconsistent with behavior of type casting constructs
Groups: php.dev 
Request: Send a blank email to php-dev+get-39182@lists.php.net to get a copy of this message
ID: 7986 Updated by: zak Reported By: zak@php.net Status: Bogus Bug Type: Variables related Assigned To: Comments: Who would have thought that using a function in the incorrect way would generate incorrect results? ;) settype returns a boolean - not re-typed variable Previous Comments: --------------------------------------------------------------------------- [2000-11-27 00:11:27] zak@php.net 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 --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=7986

« previous php.dev (#39182) next »