Voting

: five minus one?
(Example: nine)

The Note You're Voting On

eef dot vreeland at gmail dot com ΒΆ
8 years ago
Please discard my previous note; I pressed 'Add Note' too quickly

About (non-)self-closing tags:

A) <tag></tag>
$xmlRdr->isEmptyElement => false
$xmlRdr->hasValue => false
$xmlRdr->value => ''
$xmlRdr->hasAttributes => false

B) <tag />
$xmlRdr->isEmptyElement => true
$xmlRdr->hasValue => false
$xmlRdr->value => ''
$xmlRdr->hasAttributes => false

C) <tag attribute="value"></tag>
$xmlRdr->isEmptyElement => false
$xmlRdr->hasValue => false
$xmlRdr->value => ''
$xmlRdr->hasAttributes => true

D) <tag attribute="value" />
$xmlRdr->isEmptyElement => true
$xmlRdr->hasValue => false
$xmlRdr->value => ''
$xmlRdr->hasAttributes => true

... and always use the '===' operator when testing properties

<< Back to user notes page

To Top