3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-Type:text/html;charset=utf-8'); $xhtml = '<html> <body> <para>This is a paragraph</para> <para>This is another paragraph</para> </body> </html>'; $doc = new DOMDocument(); libxml_use_internal_errors(true); $doc->loadHTML($xhtml); $doc->preserveWhiteSpace=false; libxml_use_internal_errors(false); $xpath = new DOMXpath($doc); $elements = $xpath->query("//para"); foreach ($elements as $node){ echo $node->nodeValue. "<br/>"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 27, Position 2 = 32
Branch analysis from position: 27
2 jumps found. (Code = 78) Position 1 = 28, Position 2 = 32
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
filename:       /in/slPTM
function name:  (null)
number of ops:  34
compiled vars:  !0 = $xhtml, !1 = $doc, !2 = $xpath, !3 = $elements, !4 = $node
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'header'
          1        SEND_VAL                                                 'Content-Type%3Atext%2Fhtml%3Bcharset%3Dutf-8'
          2        DO_ICALL                                                 
    4     3        ASSIGN                                                   !0, '%3Chtml%3E%0A%3Cbody%3E%0A%3Cpara%3EThis+is+a+paragraph%3C%2Fpara%3E%0A%3Cpara%3EThis+is+another+paragraph%3C%2Fpara%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   11     4        NEW                                              $7      'DOMDocument'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $7
   13     7        INIT_FCALL                                               'libxml_use_internal_errors'
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                                 
   14    10        INIT_METHOD_CALL                                         !1, 'loadHTML'
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0          
   15    13        ASSIGN_OBJ                                               !1, 'preserveWhiteSpace'
         14        OP_DATA                                                  <false>
   16    15        INIT_FCALL                                               'libxml_use_internal_errors'
         16        SEND_VAL                                                 <false>
         17        DO_ICALL                                                 
   19    18        NEW                                              $14     'DOMXpath'
         19        SEND_VAR_EX                                              !1
         20        DO_FCALL                                      0          
         21        ASSIGN                                                   !2, $14
   21    22        INIT_METHOD_CALL                                         !2, 'query'
         23        SEND_VAL_EX                                              '%2F%2Fpara'
         24        DO_FCALL                                      0  $17     
         25        ASSIGN                                                   !3, $17
   22    26      > FE_RESET_R                                       $19     !3, ->32
         27    > > FE_FETCH_R                                               $19, !4, ->32
   23    28    >   FETCH_OBJ_R                                      ~20     !4, 'nodeValue'
         29        CONCAT                                           ~21     ~20, '%3Cbr%2F%3E'
         30        ECHO                                                     ~21
   22    31      > JMP                                                      ->27
         32    >   FE_FREE                                                  $19
   24    33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.77 ms | 1396 KiB | 17 Q