3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<'HTML' <article> <br> <br> <p rel="#" src="#">aaaaaa</p><br> <br> <p href="#" bla="#" bla2="#">bbbbbb</p><br><br> </article> HTML; $dom = new DOMDocument; @$dom->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $xpath = new DomXPath($dom); $elements = $xpath->query('//article/node()'); $content; foreach($elements as $element) { $content .= $element->C14N(); } echo $content;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 24
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 24
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/oFHWs
function name:  (null)
number of ops:  27
compiled vars:  !0 = $html, !1 = $dom, !2 = $xpath, !3 = $elements, !4 = $content, !5 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Carticle%3E%0A%3Cbr%3E%0A%3Cbr%3E%0A%09%3Cp+rel%3D%22%23%22+src%3D%22%23%22%3Eaaaaaa%3C%2Fp%3E%3Cbr%3E%0A%09%3Cbr%3E%0A%09%3Cp+href%3D%22%23%22+bla%3D%22%23%22+bla2%3D%22%23%22%3Ebbbbbb%3C%2Fp%3E%3Cbr%3E%3Cbr%3E%0A%3C%2Farticle%3E'
   13     1        NEW                                              $7      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $7
   14     4        BEGIN_SILENCE                                    ~10     
          5        INIT_METHOD_CALL                                         !1, 'loadHTML'
          6        SEND_VAR_EX                                              !0
          7        SEND_VAL_EX                                              8196
          8        DO_FCALL                                      0          
          9        END_SILENCE                                              ~10
   15    10        NEW                                              $12     'DomXPath'
         11        SEND_VAR_EX                                              !1
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !2, $12
   16    14        INIT_METHOD_CALL                                         !2, 'query'
         15        SEND_VAL_EX                                              '%2F%2Farticle%2Fnode%28%29'
         16        DO_FCALL                                      0  $15     
         17        ASSIGN                                                   !3, $15
   20    18      > FE_RESET_R                                       $17     !3, ->24
         19    > > FE_FETCH_R                                               $17, !5, ->24
   21    20    >   INIT_METHOD_CALL                                         !5, 'C14N'
         21        DO_FCALL                                      0  $18     
         22        ASSIGN_OP                                     8          !4, $18
   20    23      > JMP                                                      ->19
         24    >   FE_FREE                                                  $17
   23    25        ECHO                                                     !4
   24    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
295.68 ms | 998 KiB | 13 Q