3v4l.org

run code in 300+ PHP versions simultaneously
<?php $page = '<div class="showtime-bg"> <div style="float:left;"> <a href="javascript:getinfo(295, 1)"><img src="images/main/movies/movie.jpg" height="180" alt=""></a></div>'; $dom = new DOMDocument(); $dom->loadHTML($page); $xpath = new DOMXPath($dom); echo $xpath->query("//div[@class='showtime-bg']/img/@src");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8MQnG
function name:  (null)
number of ops:  16
compiled vars:  !0 = $page, !1 = $dom, !2 = $xpath
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cdiv+class%3D%22showtime-bg%22%3E%0A++++++++++++++++%3Cdiv+style%3D%22float%3Aleft%3B%22%3E%0A++++++++++++++++++++%3Ca+href%3D%22javascript%3Agetinfo%28295%2C+1%29%22%3E%3Cimg+src%3D%22images%2Fmain%2Fmovies%2Fmovie.jpg%22+height%3D%22180%22+alt%3D%22%22%3E%3C%2Fa%3E%3C%2Fdiv%3E'
    6     1        NEW                                              $4      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
    7     4        INIT_METHOD_CALL                                         !1, 'loadHTML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
    8     7        NEW                                              $8      'DOMXPath'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $8
   10    11        INIT_METHOD_CALL                                         !2, 'query'
         12        SEND_VAL_EX                                              '%2F%2Fdiv%5B%40class%3D%27showtime-bg%27%5D%2Fimg%2F%40src'
         13        DO_FCALL                                      0  $11     
         14        ECHO                                                     $11
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.88 ms | 1385 KiB | 13 Q