note 73261 added to language.expressions

From: Date: Thu, 15 Feb 2007 00:56:02 +0000
Subject: note 73261 added to language.expressions
Groups: php.notes 
Request: Send a blank email to php-notes+get-123397@lists.php.net to get a copy of this message
An easy fix (although intuitively tough to do...) is to reverse the comparison. if (5 == $a) {} If you forget the second '=', you'll get a parse error for trying to assign a value to a non-variable. ---- Server IP: 64.71.164.2 Probable Submitter: 72.75.151.81 ---- Manual Page -- http://www.php.net/manual/en/language.expressions.php Edit -- https://master.php.net/note/edit/73261 Del: integrated -- https://master.php.net/note/delete/73261/integrated Del: useless -- https://master.php.net/note/delete/73261/useless Del: bad code -- https://master.php.net/note/delete/73261/bad+code Del: spam -- https://master.php.net/note/delete/73261/spam Del: non-english -- https://master.php.net/note/delete/73261/non-english Del: in docs -- https://master.php.net/note/delete/73261/in+docs Del: other reasons-- https://master.php.net/note/delete/73261 Reject -- https://master.php.net/note/reject/73261 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#123397) next »