#19099 [Bgs->Opn]: comparison expressions

From: Date: Mon, 26 Aug 2002 08:54:34 +0000
Subject: #19099 [Bgs->Opn]: comparison expressions
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-17829@lists.php.net to get a copy of this message
ID: 19099 User updated by: jacob@emcken.dk Reported By: jacob@emcken.dk -Status: Bogus +Status: Open Bug Type: *General Issues Operating System: Debian Linux 2.4 -PHP Version: 4.1.2 +PHP Version: 4.2.2 New Comment: I have now installed PHP 4.2.2 but the problem is still there... I use Apache 1.3.26 It seems that the code only makes errors when the if() contains multple expressions like $a==2 and $a == $b it works just fine if I write if(true || flase) or if($a==$b || false) Previous Comments: ------------------------------------------------------------------------ [2002-08-26 03:39:11] cynic@php.net Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. ------------------------------------------------------------------------ [2002-08-26 03:33:39] jacob@emcken.dk I am getting errors when executing the following code wich seems to be the right syntax!? I tested it on 2 other servers running apache and php4 Here are 2 examples of the some code wich should work if i'm not mistaken: <? //Test 1 //This example give a "parse error in line 7" $a=2; $b=3; if($a==$b || $b==3) { echo "hey"; } //Test 2 //This example gives the error: "Call to undefined function: ()" $a=2; $b=3; if(($a==$b) || ($b==3)) { echo "hey"; } ?> I have coded alot of things on the server and this i the first time im have run into trouble. By the way this code sample runs just fine: <? if(false || true) { echo "hey"; } //And this one works just fine also $a=2; $b=3; if($b==3) { echo "hey"; } ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19099&edit=1

« previous php.bugs (#17829) next »