3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<XML <a> <b>success</b> </a> XML; $xml = new SimpleXMLElement($string); $result = $xml->xpath('/a/b'); foreach ($result as $r) { if (!empty($r)) { print_r((string)$r); } else { echo 'failure'; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 21
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/NddfL
function name:  (null)
number of ops:  23
compiled vars:  !0 = $string, !1 = $xml, !2 = $result, !3 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Ca%3E%0A%09%3Cb%3Esuccess%3C%2Fb%3E%0A%3C%2Fa%3E'
    8     1        NEW                                              $5      'SimpleXMLElement'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $5
   11     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              '%2Fa%2Fb'
          7        DO_FCALL                                      0  $8      
          8        ASSIGN                                                   !2, $8
   13     9      > FE_RESET_R                                       $10     !2, ->21
         10    > > FE_FETCH_R                                               $10, !3, ->21
   15    11    >   ISSET_ISEMPTY_CV                                 ~11     !3
         12        BOOL_NOT                                         ~12     ~11
         13      > JMPZ                                                     ~12, ->19
   17    14    >   INIT_FCALL                                               'print_r'
         15        CAST                                          6  ~13     !3
         16        SEND_VAL                                                 ~13
         17        DO_ICALL                                                 
         18      > JMP                                                      ->20
   21    19    >   ECHO                                                     'failure'
   13    20    > > JMP                                                      ->10
         21    >   FE_FREE                                                  $10
   23    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.23 ms | 1387 KiB | 15 Q