Monday 16 September 2019

php - What exactly does || mean?

return (empty($neededRole) || strcasecmp($role, 'admin') == 0 || strcasecmp($role, $neededRole) == 0);


What exactly does the || mean in this statement? Can someone put this in english for me.



I promise I've googled this but I guess I don't know what to google for because I can't find anything.




thanks:)

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...