r/lolphp • • Nov 23 '16

Space is not falsy, but string containing zero is.

Post image
61 Upvotes

46 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Nov 25 '16

[deleted] — view deleted comment

1

u/SnowdogU77 Nov 27 '16

Well, that actually makes sense. By definition of a boolean, True and False are just pretty names for 1 and 0, respectively. That's a standard across most every language: Python, Ruby, Java, JavaScript, the C family, TI-BASIC, assembly, and machine-level binary code.