note 10596 added to Types

From: Date: Thu, 11 Jan 2001 23:19:57 +0000
Subject: note 10596 added to Types
Groups: php.notes 
Request: Send a blank email to php-notes+get-9676@lists.php.net to get a copy of this message
The above quote is not complete: "Boolean: 1 is true and 0 is false, this is true in many languages; Mostly C-like ones use such syntax incluing: perl, java, and even php." In fact with integers 0 is false and any other value is true. This means that -1 or 22 or -34 are all evaluated as true. This is important to understand when your conditional expressions aren't doing what you expect! http://www.php.net/manual/language.types.php

« previous php.notes (#9676) next »