#23088 [Com]: 'if' 'else' has a strange behavior.

From: Date: Mon, 07 Apr 2003 17:03:10 +0000
Subject: #23088 [Com]: 'if' 'else' has a strange behavior.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-37283@lists.php.net to get a copy of this message
ID: 23088 Comment by: jlg at huelladigital dot net Reported By: batera at linux dot ime dot usp dot br Status: Open Bug Type: Output Control Operating System: Slackware Linux PHP Version: 4.3.2RC1 New Comment: You have a syntax error in your script. It says: if (!isset($usuario) OR $usuario != $login (...) ^^ It should say: if (!isset($usuario) OR $usuario !== $login (...) ^^^ Previous Comments: ------------------------------------------------------------------------ [2003-04-07 08:06:36] batera at linux dot ime dot usp dot br The best whay to show you my problem is send you my example. This expression works as expected: <? if (!isset($usuario) OR $usuario != $login OR $usuario == 'logoff' OR $user_senha != $senha OR $user_senha == 'null') { echo "okokok"; } else echo "corrigido!"; ?> but, when I remove the 'else', 'if', tha in first was false, become true. <? if (!isset($usuario) OR $usuario != $login OR $usuario == 'logoff' OR $user_senha != $senha OR $user_senha == 'null') { echo "ppp"; } ?> I'll go back to php 3.1 'cause I need it working. Please, let me know when this bug is fixed. tx a lot. you allways have done a grate job! best wishes OgRo ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23088&edit=1

« previous php.bugs (#37283) next »