Why doesn't this work?

```
function test(){

if($id == 2) {$z = "hello";}
if($id == 3) {$z = "bye";}

return $z;

}

if(test() != "hello"){
echo "bye";
}
else
{
echo "hi";
}

```

How can I check what function returns properly?