I have a small code snippet has below
$duration = 0;
if ($duration == 'daily') {
$duration = '+1 DAY';
}
echo $duration;
I am expecting 0 has output but end results are +1 DAY. i am not able to understand why above conditions is success?
But we i use === returning expected results.
I have checked in php 7
and php 5.5
. both versions are giving the 0 as output.