tidyNode::hasSiblings

(PHP 5, PHP 7, PHP 8)

tidyNode::hasSiblingsChecks if a node has siblings

Description

publictidyNode::hasSiblings(): bool

Tells if the node has siblings.

Parameters

This function has no parameters.

Return Values

Returns true if the node has siblings, false otherwise.

Examples

Example #1 tidyNode::hasSiblings() example

<?php

$html
= <<< HTML
<html><head>
<?php echo '<title>title</title>'; ?>
<#

alert('Hello World');
#>
</head>
<body>

<?php

The above example will output:

bool(false) bool(true)
To Top