I think the best way to go would be to initialise these variables you do comparisons on, by assigning some sort of value like null
before your procedure.
$chicken = null;
// some code that generates $egg value
if ($egg) {
$chicken = "Leghorn";
}
if ("Leghorn" === $chicken) {
echo "I say ..I say...boy...";
}
So if $chicken = null;
was missing in the example above, and the value of $egg
was false, you would normally get a PHP notice.