|
DOMNode::compareDocumentPositionCompares the position of two nodes 説明
public int DOMNode::compareDocumentPosition(DOMNode
$other )Compares the position of the other node relative to this node. パラメータ
戻り値
A bitmask of the 例例1 DOMNode::compareDocumentPosition example
上の例の出力は以下となります。 int(20) // This is DOMNode::DOCUMENT_POSITION_CONTAINED_BY | DOMNode::DOCUMENT_POSITION_FOLLOWING int(2) // This is DOMNode::DOCUMENT_POSITION_PRECEDING |