Jump to content

[SOLVED] Is there a limit to an If() statment for AND && conditions?


Recommended Posts

Just curious if anyone had any issue's with have 4 && conditions in an IF statement.

 

I've had several fail checks, and I don't know why.

 

If I do

1==1 && 2==2 && 3==3

It will work fine... if I do

1==1 && 2==2 && 3==3 && 4==4

it fails?

 

It's easy to work around, just have if 1==1 then check if 2==2 - 4==4 etc... but wasn't sure if it's known issue?

like a charm.....

 

also what version of php are you using?  ive got 5.2.5.

<?php
if( 1==1 && 2==2 && 3==3 && 4==4 && 5==5 && 6==6){
echo('hello');
}
else{
echo'fuck';

}

I doubt PHP versions has to do with anything, but you never know  ;D

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.