3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = "<iframe class=\"elementor-video-iframe\" allowfullscreen src=\"https://player.vimeo.com/video/972057159?autoplay=1&amp;color&amp;autopause=0&amp;loop=0&amp;muted=0&amp;title=0&amp;portrait=0&amp;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));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qBMSA
function name:  (null)
number of ops:  30
compiled vars:  !0 = $html, !1 = $document, !2 = $xpath, !3 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Ciframe+class%3D%22elementor-video-iframe%22+allowfullscreen+src%3D%22https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F972057159%3Fautoplay%3D1%26amp%3Bcolor%26amp%3Bautopause%3D0%26amp%3Bloop%3D0%26amp%3Bmuted%3D0%26amp%3Btitle%3D0%26amp%3Bportrait%3D0%26amp%3Bbyline%3D0%23t%3D%22%3E%3C%2Fiframe%3E'
    5     1        NEW                                              $5      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $5
    6     4        INIT_METHOD_CALL                                         !1, 'loadHTML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
    7     7        NEW                                              $9      'DOMXpath'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $9
    9    11        INIT_METHOD_CALL                                         !2, 'evaluate'
         12        SEND_VAL_EX                                              'string%28%2F%2Fiframe%5B%40class%3D%22elementor-video-iframe%22%5D%2F%40src%29'
         13        DO_FCALL                                      0  $12     
         14        ASSIGN                                                   !3, $12
   10    15        INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'preg_replace'
         17        SEND_VAL                                                 '%28%5B%3F%23%5D.%2A%24%29'
         18        SEND_VAL                                                 ''
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                         $14     
         21        SEND_VAR                                                 $14
         22        DO_ICALL                                                 
   11    23        INIT_FCALL                                               'var_dump'
         24        INIT_FCALL                                               'parse_url'
         25        SEND_VAR                                                 !3
         26        DO_ICALL                                         $16     
         27        SEND_VAR                                                 $16
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.45 ms | 1003 KiB | 16 Q