3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = '<a href="#">ABC<BR>DEF</a>'; $doc = new DOMDocument(); @$doc->loadHTML($a); $finder = new DomXPath($doc); $nodes = $finder->query("//a"); foreach ($nodes as $node) { var_dump(($node->c14n())); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 25
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 25
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/LjMuE
function name:  (null)
number of ops:  27
compiled vars:  !0 = $a, !1 = $doc, !2 = $finder, !3 = $nodes, !4 = $node
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, '%3Ca+href%3D%22%23%22%3EABC%3CBR%3EDEF%3C%2Fa%3E'
    3     1        NEW                                                  $6      'DOMDocument'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !1, $6
    4     4        BEGIN_SILENCE                                        ~9      
          5        INIT_METHOD_CALL                                             !1, 'loadHTML'
          6        SEND_VAR_EX                                                  !0
          7        DO_FCALL                                          0          
          8        END_SILENCE                                                  ~9
    5     9        NEW                                                  $11     'DomXPath'
         10        SEND_VAR_EX                                                  !1
         11        DO_FCALL                                          0          
         12        ASSIGN                                                       !2, $11
    6    13        INIT_METHOD_CALL                                             !2, 'query'
         14        SEND_VAL_EX                                                  '%2F%2Fa'
         15        DO_FCALL                                          0  $14     
         16        ASSIGN                                                       !3, $14
    7    17      > FE_RESET_R                                           $16     !3, ->25
         18    > > FE_FETCH_R                                                   $16, !4, ->25
    8    19    >   INIT_FCALL                                                   'var_dump'
         20        INIT_METHOD_CALL                                             !4, 'c14n'
         21        DO_FCALL                                          0  $17     
         22        SEND_VAR                                                     $17
         23        DO_ICALL                                                     
    7    24      > JMP                                                          ->18
         25    >   FE_FREE                                                      $16
    9    26      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.93 ms | 2554 KiB | 14 Q