EDIT : Damn... It was all about Path to the file and somehow I didn't thought about restructuring :| thanks to @Machavity I found the problem.
What is wrong with this code ?
If $foo is set and file exist file_exist() result should be 1.
else if $foo is set but file does not exist file_exist() result should be 2.
else result should be 3.
But I am only getting result 2 for all the three conditions. There gotta be something wrong with the second part of the elseif.
if ( isset ( $foo ) && file_exists ( 'bar.php' ) )
{
echo '1';
}
else if ( isset ( $foo ) && ( ! file_exists ( 'bar.php' ) ) )
{
echo '2';
}
else
{
echo '3';
}
$foois?