- var_dump: documentation ( source)
- parse_url: documentation ( source)
- preg_replace: documentation ( source)
<?php
$html = "<iframe class=\"elementor-video-iframe\" allowfullscreen src=\"https://player.vimeo.com/video/972057159?autoplay=1&color&autopause=0&loop=0&muted=0&title=0&portrait=0&byline=0#t=\"></iframe>";
$document = new DOMDocument();
$document->loadHTML($html);
$xpath = new DOMXpath($document);
$url = $xpath->evaluate('string(//iframe[@class="elementor-video-iframe"]/@src)');
var_dump(preg_replace('([?#].*$)', '', $url));
var_dump(parse_url($url));