3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<html><body> <a href="a.html">some a</a> <a href="b.html">some b</a> </body></html>'; libxml_use_internal_errors(true); // ignore malformed HTML $xml = new DOMDocument(); $xml->loadHTML($html); foreach($xml->getElementsByTagName('a') as $link) { var_dump('a'); $link->nodeValue = 'abc'; } print_r(libxml_get_errors()); print_r($html);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 21
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 21
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/DSk8s
function name:  (null)
number of ops:  31
compiled vars:  !0 = $html, !1 = $xml, !2 = $link
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Chtml%3E%3Cbody%3E%0A++++++++++%3Ca+href%3D%22a.html%22%3Esome+a%3C%2Fa%3E%0A++++++++++%3Ca+href%3D%22b.html%22%3Esome+b%3C%2Fa%3E%0A+++++++++%3C%2Fbody%3E%3C%2Fhtml%3E'
    6     1        INIT_FCALL                                               'libxml_use_internal_errors'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                                 
    7     4        NEW                                              $5      'DOMDocument'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
    8     7        INIT_METHOD_CALL                                         !1, 'loadHTML'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
    9    10        INIT_METHOD_CALL                                         !1, 'getElementsByTagName'
         11        SEND_VAL_EX                                              'a'
         12        DO_FCALL                                      0  $9      
         13      > FE_RESET_R                                       $10     $9, ->21
         14    > > FE_FETCH_R                                               $10, !2, ->21
   10    15    >   INIT_FCALL                                               'var_dump'
         16        SEND_VAL                                                 'a'
         17        DO_ICALL                                                 
   11    18        ASSIGN_OBJ                                               !2, 'nodeValue'
         19        OP_DATA                                                  'abc'
    9    20      > JMP                                                      ->14
         21    >   FE_FREE                                                  $10
   14    22        INIT_FCALL                                               'print_r'
         23        INIT_FCALL                                               'libxml_get_errors'
         24        DO_ICALL                                         $13     
         25        SEND_VAR                                                 $13
         26        DO_ICALL                                                 
   15    27        INIT_FCALL                                               'print_r'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.76 ms | 1388 KiB | 21 Q