I thought, constructions like if(){}-else{}
are so common, that I would never have problems with this.
But...with next code my brain is blowing up. Need any advice.
Subject is:
//print_r($_SESSION);
/*array(
[filterSub] => Array
(
[app] => vedushchiye
[workin] => Array
(
[0] => vecherinka
)
)
)*/
$catCur = 'vedushchiye'; //for example
if (!empty($_SESSION['filterSub']) && isset($_SESSION['filterSub']['app']) && !empty($_SESSION['filterSub']['app']) && $_SESSION['filterSub']['app'] != $catCur && $catCur != 'performers'){
$_SESSION['filterSub']['workin'] = array();
echo ' stage 2 ok ';
}
So, I expected that the condition will not run.
And it really did not run, but this part $_SESSION['filterSub']['workin'] = array();
ran and echo ' stage 2 ok ';
wasn't.
How is it possible?