3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<html><body><div class="item active" style="display: block; left: 685.5753504672897px; top: 0px; height: 475.3125px; width: 318.84929906542055px; font-size: 100%; z-index: 32768; visibility: visible;"> <canvas class="content landscape" href="#" src="imgs/dead.jpg" title="The Dead Weather - Horehound" id="3" num="0" song="Horehound" origproportion="1.0062305295950156" width="323" height="482"></canvas></div></body></html>'; $doc = new DOMDocument(); $doc->loadHTML($html); $xpath = new DOMXPath($doc); $resulted = $xpath->query('div[@class="active"]'); $active= $resulted->item->query('div[@class="content"]');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uHGZh
function name:  (null)
number of ops:  21
compiled vars:  !0 = $html, !1 = $doc, !2 = $xpath, !3 = $resulted, !4 = $active
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Chtml%3E%3Cbody%3E%3Cdiv+class%3D%22item+active%22+style%3D%22display%3A+block%3B+left%3A+685.5753504672897px%3B+top%3A+0px%3B+height%3A+475.3125px%3B+width%3A+318.84929906542055px%3B+font-size%3A+100%25%3B+z-index%3A+32768%3B+visibility%3A+visible%3B%22%3E%0A%3Ccanvas+class%3D%22content+landscape%22+href%3D%22%23%22+src%3D%22imgs%2Fdead.jpg%22+title%3D%22The+Dead+Weather+-+Horehound%22+id%3D%223%22+num%3D%220%22+song%3D%22Horehound%22+origproportion%3D%221.0062305295950156%22+width%3D%22323%22+height%3D%22482%22%3E%3C%2Fcanvas%3E%3C%2Fdiv%3E%3C%2Fbody%3E%3C%2Fhtml%3E'
    6     1        NEW                                              $6      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $6
    7     4        INIT_METHOD_CALL                                         !1, 'loadHTML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
    8     7        NEW                                              $10     'DOMXPath'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $10
    9    11        INIT_METHOD_CALL                                         !2, 'query'
         12        SEND_VAL_EX                                              'div%5B%40class%3D%22active%22%5D'
         13        DO_FCALL                                      0  $13     
         14        ASSIGN                                                   !3, $13
   10    15        FETCH_OBJ_R                                      ~15     !3, 'item'
         16        INIT_METHOD_CALL                                         ~15, 'query'
         17        SEND_VAL_EX                                              'div%5B%40class%3D%22content%22%5D'
         18        DO_FCALL                                      0  $16     
         19        ASSIGN                                                   !4, $16
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.82 ms | 1394 KiB | 13 Q