3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <div class="webstarvideo"> <video style="width:100%;height:100%" preload="none" class=""> <source src="I NEED THIS" type="video/mp4"></video> <div class="webstarvideodoul"> <canvas></canvas> </div> </div> HTML; $doc = new DOMDocument(); libxml_use_internal_errors(true); $doc->loadHTML($html); $xpath = new DOMXPath($doc); echo $xpath->evaluate("string(//video[contains(@style, 'height:100%') and contains(@style, 'height:100%')]/source/@src)");

preferences:
24.85 ms | 404 KiB | 5 Q