php int comparison “smaller or equal than” returns empty or null?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP

php int comparison “smaller or equal than” returns empty or null?



The following expression


echo ('dfsdfds: '.(int)$item[0] . ' ' .
(int)$box[0] . ' ' .
( ( (int)$item[0] <= (int)$box[0] )?true:false) );



echoes this


dfsdfds: 70 25



I would expect the comparison expression <= to return either 1 or 0 but not null or empty...
What is wrong? what am I not thinking thorugh? I have tried to replace true with TRUE and false with FALSE, but the output didn't change...









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

Executable numpy error

PySpark count values by condition

Mass disable jenkins jobs