I was looking up true/false bool conditions from the php manual and I thought this should echo a false, but it echos a true instead. So what does the !call()
truly do? Is it saying that the function is just working?
http://php.net/manual/en/control-structures.if.php
<?php
$true=0; //false
function call($true)
{
if ($true =1){
return TRUE;
}
if ($true =0){
return FALSE;
}
}
if(call()) {
echo "true";
}
if(!call()) // or if(!call()) {
echo "false";
}
if($true) {
echo "<br>true";
}
if(!$true) {
echo "<br>false";
}
?>
Output:
true
false