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)");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dQZ65
function name:  (null)
number of ops:  19
compiled vars:  !0 = $html, !1 = $doc, !2 = $xpath
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cdiv+class%3D%22webstarvideo%22%3E%0A++%3Cvideo+style%3D%22width%3A100%25%3Bheight%3A100%25%22+preload%3D%22none%22+class%3D%22%22%3E%0A++++%3Csource+src%3D%22I+NEED+THIS%22+type%3D%22video%2Fmp4%22%3E%3C%2Fvideo%3E%0A++%3Cdiv+class%3D%22webstarvideodoul%22%3E%0A++++%3Ccanvas%3E%3C%2Fcanvas%3E%0A++%3C%2Fdiv%3E%0A%3C%2Fdiv%3E'
   13     1        NEW                                              $4      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
   14     4        INIT_FCALL                                               'libxml_use_internal_errors'
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                                 
   15     7        INIT_METHOD_CALL                                         !1, 'loadHTML'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
   16    10        NEW                                              $9      'DOMXPath'
         11        SEND_VAR_EX                                              !1
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !2, $9
   17    14        INIT_METHOD_CALL                                         !2, 'evaluate'
         15        SEND_VAL_EX                                              'string%28%2F%2Fvideo%5Bcontains%28%40style%2C+%27height%3A100%25%27%29+and+contains%28%40style%2C+%27height%3A100%25%27%29%5D%2Fsource%2F%40src%29'
         16        DO_FCALL                                      0  $12     
         17        ECHO                                                     $12
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.14 ms | 999 KiB | 14 Q