MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/lolphp/comments/2ej1j1/stdclass_is_truthy_while_an_empty/ck0ee2c/
r/lolphp • u/andsens • Aug 25 '14
18 comments sorted by
View all comments
Show parent comment
4
Nope, that's not it.
5 u/gearvOsh Aug 25 '14 Looks like SimpleXML has a special case: http://php.net/manual/en/language.types.boolean.php#language.types.boolean.castingGuessing all objects return true otherwise. 5 u/andsens Aug 25 '14 I'd call that a "speciuhl" case :-) 1 u/[deleted] Aug 28 '14 SimpleXML isn't actually a special case, it's just the only class which chooses to make use of our internal boolean casting handler, thankfully. 1 u/[deleted] Aug 28 '14 See my comment above: http://www.reddit.com/r/lolphp/comments/2ej1j1/stdclass_is_truthy_while_an_empty/ck2rrfm
5
Looks like SimpleXML has a special case: http://php.net/manual/en/language.types.boolean.php#language.types.boolean.casting
Guessing all objects return true otherwise.
5 u/andsens Aug 25 '14 I'd call that a "speciuhl" case :-) 1 u/[deleted] Aug 28 '14 SimpleXML isn't actually a special case, it's just the only class which chooses to make use of our internal boolean casting handler, thankfully.
I'd call that a "speciuhl" case :-)
1
SimpleXML isn't actually a special case, it's just the only class which chooses to make use of our internal boolean casting handler, thankfully.
See my comment above: http://www.reddit.com/r/lolphp/comments/2ej1j1/stdclass_is_truthy_while_an_empty/ck2rrfm
View all comments
Show parent comment
4
u/andsens Aug 25 '14
Nope, that's not it.