note 32875 deleted from language.operators by sniper

From: Date: Mon, 13 Oct 2003 00:05:57 +0000
Subject: note 32875 deleted from language.operators by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-58369@lists.php.net to get a copy of this message
Note Submitter: php@electricsurfer.com ---- Work-around for absence of ||= and &&= When working with booleans you can use |= and &= instead and the result will be an integer 0 or 1 which you can cast to bool if necessary. You can also use |= and &= in place of ||= and &&= if you originally have integers, and then cast the result to bool if necessary. This works because PHP casts 0 to false and any other # (including negatives) to true.

« previous php.notes (#58369) next »