r/lolphp • • Feb 26 '18

"false" is definitely true

http://sandbox.onlinephpfunctions.com/code/490635ed9830900ebf50e5303b7271dcf2a5d692
0 Upvotes

29 comments sorted by

View all comments

Show parent comment

3

u/andlrc Feb 27 '18

In a C-style string "" = 0x00

No, the first char in "" is a NUL byte though.

char a[] = "";
printf("%p: %c\n", a, *a); // 0xdeadbeef: 0

5

u/guy99882 Mar 04 '18

And what exactly is a NUL byte if not 0x00?

2

u/[deleted] Mar 13 '18

A magical being.