3v4l.org

run code in 500+ PHP versions simultaneously
<?php $html = <<<HTML <li class="item-133"><a href="/webdesign-tipps" title="Wissenswertes zu Webdesign, Grafikdesign oder Onlinemarketing">Wissenswertes</a></li><li class="item-115"><a href="/webagentur" >Webagentur</a></li><li class="item-257"><a href="/team" >Team</a></li><li class="item-116 menu-parent"><a href="/support" >Support<span class="menu-toggler"></span></a></li><li class="item-350"><a href="/jobs" >Jobs</a></li><li class="item-120"><a href="/kontakt" >Kontakt</a></li></ul> HTML; $dom = new DOMDocument; libxml_use_internal_errors(true); $dom->loadHTML($html); $xpath = new DOMXPath($dom); $result = []; foreach ($xpath->query('//a[text() = "Kontakt"]') as $a) { $result[] = $dom->saveHtml($a); } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 26
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 26
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/m6IX8
function name:  (null)
number of ops:  31
compiled vars:  !0 = $html, !1 = $dom, !2 = $xpath, !3 = $result, !4 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%3Cli+class%3D%22item-133%22%3E%3Ca+href%3D%22%2Fwebdesign-tipps%22+title%3D%22Wissenswertes+zu+Webdesign%2C+Grafikdesign+oder+Onlinemarketing%22%3EWissenswertes%3C%2Fa%3E%3C%2Fli%3E%3Cli+class%3D%22item-115%22%3E%3Ca+href%3D%22%2Fwebagentur%22+%3EWebagentur%3C%2Fa%3E%3C%2Fli%3E%3Cli+class%3D%22item-257%22%3E%3Ca+href%3D%22%2Fteam%22+%3ETeam%3C%2Fa%3E%3C%2Fli%3E%3Cli+class%3D%22item-116+menu-parent%22%3E%3Ca+href%3D%22%2Fsupport%22+%3ESupport%3Cspan+class%3D%22menu-toggler%22%3E%3C%2Fspan%3E%3C%2Fa%3E%3C%2Fli%3E%3Cli+class%3D%22item-350%22%3E%3Ca+href%3D%22%2Fjobs%22+%3EJobs%3C%2Fa%3E%3C%2Fli%3E%3Cli+class%3D%22item-120%22%3E%3Ca+href%3D%22%2Fkontakt%22+%3EKontakt%3C%2Fa%3E%3C%2Fli%3E%3C%2Ful%3E'
    7     1        NEW                                                  $6      'DOMDocument'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !1, $6
    8     4        INIT_FCALL                                                   'libxml_use_internal_errors'
          5        SEND_VAL                                                     <true>
          6        DO_ICALL                                                     
    9     7        INIT_METHOD_CALL                                             !1, 'loadHTML'
          8        SEND_VAR_EX                                                  !0
          9        DO_FCALL                                          0          
   10    10        NEW                                                  $11     'DOMXPath'
         11        SEND_VAR_EX                                                  !1
         12        DO_FCALL                                          0          
         13        ASSIGN                                                       !2, $11
   11    14        ASSIGN                                                       !3, <array>
   12    15        INIT_METHOD_CALL                                             !2, 'query'
         16        SEND_VAL_EX                                                  '%2F%2Fa%5Btext%28%29+%3D+%22Kontakt%22%5D'
         17        DO_FCALL                                          0  $15     
         18      > FE_RESET_R                                           $16     $15, ->26
         19    > > FE_FETCH_R                                                   $16, !4, ->26
   13    20    >   INIT_METHOD_CALL                                             !1, 'saveHtml'
         21        SEND_VAR_EX                                                  !4
         22        DO_FCALL                                          0  $18     
         23        ASSIGN_DIM                                                   !3
         24        OP_DATA                                                      $18
   12    25      > JMP                                                          ->19
         26    >   FE_FREE                                                      $16
   15    27        INIT_FCALL                                                   'var_export'
         28        SEND_VAR                                                     !3
         29        DO_ICALL                                                     
         30      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.1 ms | 1948 KiB | 15 Q