3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html=<<<END <div class="resultFound"> <font class="orangebold">110</font> Properties Found </div> END; $doc = new DOMDocument(); $doc->loadHTML($html); $xpath = new DOMXPath($doc); $fonts = $xpath->query('//div[@class="resultFound"]/font[@class="orangebold"]'); foreach($fonts as $font){ echo $font->textContent. "\n"; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/J7N0Q
function name:  (null)
number of ops:  23
compiled vars:  !0 = $html, !1 = $doc, !2 = $xpath, !3 = $fonts, !4 = $font
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cdiv+class%3D%22resultFound%22%3E%0A%09++++++++++++%09%09%09%09%09%3Cfont+class%3D%22orangebold%22%3E110%3C%2Ffont%3E+Properties+Found%0A%09%09%09%09%09%09%09%09%0A%09++++++++++++%09++++++++%3C%2Fdiv%3E'
    8     1        NEW                                              $6      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $6
    9     4        INIT_METHOD_CALL                                         !1, 'loadHTML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   10     7        NEW                                              $10     'DOMXPath'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $10
   11    11        INIT_METHOD_CALL                                         !2, 'query'
         12        SEND_VAL_EX                                              '%2F%2Fdiv%5B%40class%3D%22resultFound%22%5D%2Ffont%5B%40class%3D%22orangebold%22%5D'
         13        DO_FCALL                                      0  $13     
         14        ASSIGN                                                   !3, $13
   12    15      > FE_RESET_R                                       $15     !3, ->21
         16    > > FE_FETCH_R                                               $15, !4, ->21
   13    17    >   FETCH_OBJ_R                                      ~16     !4, 'textContent'
         18        CONCAT                                           ~17     ~16, '%0A'
         19        ECHO                                                     ~17
   12    20      > JMP                                                      ->16
         21    >   FE_FREE                                                  $15
   15    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.85 ms | 1394 KiB | 13 Q