3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text='<p class="users_attr" style=""></p> <h3 class="show_user_h3" style=""><a href="/ru/tutors/violin/" class="link_users_attr">Игра на скрипке, виолончели</a></h3> , <h3 class="show_user_h3" style=""><a href="/ru/tutors/hrafika-1/" class="link_users_attr">Искусствоведение</a></h3> , <h3 class="show_user_h3" style=""><a href="/ru/tutors/uroki-vokala/" class="link_users_attr">Уроки вокала</a></h3> , <h3 class="show_user_h3" style=""><a href="/ru/tutors/hra-na-fortepano/" class="link_users_attr">Игра на фортепиано</a></h3> , <h3 class="show_user_h3" style=""><a href="/ru/tutors/sopilka/" class="link_users_attr">Игра на флейте</a></h3> , <h3 class="show_user_h3" style=""><a href="/ru/tutors/muzika/" class="link_users_attr">Музыка</a></h3> , <h3 class="show_user_h3" style=""><a href="/ru/tutors/psykholohiia/" class="link_users_attr">Психология</a></h3> <p style=""></p>'; $dom=new DOMDocument; $dom->loadHTML('<?xml encoding="utf-8" ?>' . $text); // https://stackoverflow.com/a/8218649/2943403 $xpath = new DOMXPath($dom); $data['cats'] = []; foreach ($xpath->query("//a") as $node) { $data['cats'][] = $node->nodeValue; } echo implode('; ', $data['cats']);
Output for git.master, git.master_jit, rfc.property-hooks
Игра на скрипке, виолончели; Искусствоведение; Уроки вокала; Игра на фортепиано; Игра на флейте; Музыка; Психология

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:
47.75 ms | 401 KiB | 8 Q