(PHP 5, PHP 7, PHP 8)
tidyNode::hasChildren — Indique si le nœud a des enfants
Cette fonction ne contient aucun paramètre.
Exemple #1 Exemple avec tidyNode::hasChildren()
<?php
$html = <<< HTML
<html><head>
<?php echo '<title>title</title>'; ?>
<#
alert('Hello World');
#>
</head>
<body>
<?php
L'exemple ci-dessus va afficher :
bool(true) bool(false)