note 18626 added to language.types.boolean

From: Date: Tue, 29 Jan 2002 21:46:58 +0000
Subject: note 18626 added to language.types.boolean
Groups: php.notes 
Request: Send a blank email to php-notes+get-25988@lists.php.net to get a copy of this message
PHP seems happy to convert your boolean to an integer representation of 'true' and 'false.' I experienced this when I was setting a session variable to true. When I called the session variable back out it wasn't 'true' it was 1. Be sure to write your conditional statements as if($val) instead of if($val == true). -- http://www.php.net/manual/en/language.types.boolean.php http://master.php.net/manage/user-notes.php?action=edit+18626 http://master.php.net/manage/user-notes.php?action=delete+18626 http://master.php.net/manage/user-notes.php?action=reject+18626

« previous php.notes (#25988) next »