Link to home
Start Free TrialLog in
Avatar of wilson1000
wilson1000

asked on

PHP If statements. Stacked parentheses explained?

Hi,

Can someone please explain the proper use of stacked parentheses like so:

if( $x == 3 && $y == 8 ){
    echo 'hi';
}

Against:

if( ( $x == 3 ) && ( $y == 8 ) ){
    echo 'hi';
}

What would be the significance of the added parentheses?

Thank you
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wilson1000
wilson1000

ASKER

Thank you