3v4l.org

run code in 300+ PHP versions simultaneously
<?php $links = '<li><a href="/plitka/">Керамическая плитка</a></li> <li><a href="/napolnye-pokrytiya/">Напольные покрытия</a></li> <li><a href="/oboi/">Обои</a></li> <li><a href="/mebel-dlia-vannoi/">Мебель для ванной</a></li> <li><a href="/santehnika/">Сантехника</a></li>'; $dom = new domdocument(); $dom->loadhtml('<?xml encoding="utf-8" ?>' . $links); $links = $dom->getelementsbytagname('a'); foreach($links as $link) { echo $link->nodeValue . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/b1lKZ
function name:  (null)
number of ops:  20
compiled vars:  !0 = $links, !1 = $dom, !2 = $link
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cli%3E%3Ca+href%3D%22%2Fplitka%2F%22%3E%D0%9A%D0%B5%D1%80%D0%B0%D0%BC%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B0%D1%8F+%D0%BF%D0%BB%D0%B8%D1%82%D0%BA%D0%B0%3C%2Fa%3E%3C%2Fli%3E+%0A%3Cli%3E%3Ca+href%3D%22%2Fnapolnye-pokrytiya%2F%22%3E%D0%9D%D0%B0%D0%BF%D0%BE%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5+%D0%BF%D0%BE%D0%BA%D1%80%D1%8B%D1%82%D0%B8%D1%8F%3C%2Fa%3E%3C%2Fli%3E+%0A%3Cli%3E%3Ca+href%3D%22%2Foboi%2F%22%3E%D0%9E%D0%B1%D0%BE%D0%B8%3C%2Fa%3E%3C%2Fli%3E+%0A%3Cli%3E%3Ca+href%3D%22%2Fmebel-dlia-vannoi%2F%22%3E%D0%9C%D0%B5%D0%B1%D0%B5%D0%BB%D1%8C+%D0%B4%D0%BB%D1%8F+%D0%B2%D0%B0%D0%BD%D0%BD%D0%BE%D0%B9%3C%2Fa%3E%3C%2Fli%3E+%0A%3Cli%3E%3Ca+href%3D%22%2Fsantehnika%2F%22%3E%D0%A1%D0%B0%D0%BD%D1%82%D0%B5%D1%85%D0%BD%D0%B8%D0%BA%D0%B0%3C%2Fa%3E%3C%2Fli%3E'
    7     1        NEW                                              $4      'domdocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
    8     4        INIT_METHOD_CALL                                         !1, 'loadhtml'
          5        CONCAT                                           ~7      '%3C%3Fxml+encoding%3D%22utf-8%22+%3F%3E', !0
          6        SEND_VAL_EX                                              ~7
          7        DO_FCALL                                      0          
    9     8        INIT_METHOD_CALL                                         !1, 'getelementsbytagname'
          9        SEND_VAL_EX                                              'a'
         10        DO_FCALL                                      0  $9      
         11        ASSIGN                                                   !0, $9
   10    12      > FE_RESET_R                                       $11     !0, ->18
         13    > > FE_FETCH_R                                               $11, !2, ->18
   11    14    >   FETCH_OBJ_R                                      ~12     !2, 'nodeValue'
         15        CONCAT                                           ~13     ~12, '%0A'
         16        ECHO                                                     ~13
   10    17      > JMP                                                      ->13
         18    >   FE_FREE                                                  $11
   12    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.3 ms | 1000 KiB | 13 Q