I have a problem with WordPress. I am running this function:
function name($text = '', $relative = false, $icon = true) {
echo $text;
echo $relative;
echo $icon;
}
and the output of it is just “1” (one). How is it possible? Shouldn’t be 3 lines of code (3 answers)? I am using apache 2.4, php 5.4.1 and wordpress 3.4 beta 3 on windows 7.
if you add wrapper dummies and line breaks to each echo, you’ll find why it is showing just “1”:
outputs :
Thats correct.
First one is null, second one is false which is treated as 0 which is outputed as null. The last one is true, which is 1. Wich makes the output 1.
As shown here:
(output of above script)