PHP printed boolean value is empty, why?

Be careful when you convert back and forth with boolean, the manual says:

A boolean TRUE value is converted to the string “1”. Boolean FALSE is
converted to “” (the empty string). This allows conversion back and
forth between boolean and string values.

So you need to do a:

echo (int)$local_rates_file_exists."<br>";

Leave a Comment