+ 5

Why echo null==NULL; gives output as 1? Why it is not given output as word true? & also they are different cases.

26th Apr 2020, 12:05 PM
U. A. Divyanganee Sandarekha
U. A. Divyanganee Sandarekha - avatar
2 Respuestas
+ 2
because it is a logic statement like boolean and it is returning 1 because null is not case sensitive (nUll,Null,nuLl)they all mean null (0)
26th Apr 2020, 9:20 PM
eo yo
eo yo - avatar
+ 1
There it happens casting to integer 1 when you print it or use it in an expression. If it false, nothing displays... Edit: This may help you.. Read from this, steve's explanation and next ones for more information... https://www.php.net/manual/en/language.types.boolean.php
26th Apr 2020, 9:25 PM
Jayakrishna 🇮🇳