PHP 8.5.0 Alpha 4 available for testing

Voting

: three plus zero?
(Example: nine)

The Note You're Voting On

kdos
14 years ago
Using stuff like: is_object($xml->module->admin) to check if there actually is a node called "admin", doesn't seem to work as expected, since simplexml always returns an object- in that case an empty one - even if a particular node does not exist.
For me good old empty() function seems to work just fine in such cases.

Cheers

<< Back to user notes page

To Top