$a = false; $foo = $a == false? "Berry" : "Fruit"; print ($foo); // will output: "Berry" // this is the same thing as doing: $a = false; $foo = null; //you would have to declare the variable here first if register_globals is off if ($a == false) { $foo = "Berry"; } else { $foo = "Fruit"; } print ($foo); // again, outputs: "Berry"