3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = 'cualquiercosa<b>contenido</b>cualquiercosa'; //Generar el DOM $dom = new DOMDocument; $dom->loadHTML($html, LIBXML_COMPACT | LIBXML_HTML_NOIMPLIED | LIBXML_NONET); //Obtener todos los tags <B> $b_nodelist = $dom->getElementsByTagName('b'); //Bucle para cada <b> foreach ($b_nodelist as $b) { //Obtener el contenido de texto del tag $texto = $b->textContent; echo "\n\nContenido del B:\n" . $texto; // => contenido }
Output for git.master, git.master_jit, rfc.property-hooks
Contenido del B: contenido

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
29.13 ms | 405 KiB | 5 Q