3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <?xml version="1.0"?> <a> <b> <c> <value>Some Value</value> </c> </b> </a> XML; $a = new SimpleXMLElement($xml); $nodes = $a->xpath('/a/b/c/value'); $node = $nodes[0]; if ($node) { echo "Node\n"; } foreach ($a->b->c->children() as $key => $value) { if ($value) { echo "VALUE\n"; } var_dump($value); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 26
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 26
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 22
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 22
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
Branch analysis from position: 13
filename:       /in/fuKVc
function name:  (null)
number of ops:  28
compiled vars:  !0 = $xml, !1 = $a, !2 = $nodes, !3 = $node, !4 = $value, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22%3F%3E%0A%3Ca%3E%0A++++%3Cb%3E%0A++++++++%3Cc%3E%0A++++++++++++%3Cvalue%3ESome+Value%3C%2Fvalue%3E%0A++++++++%3C%2Fc%3E%0A++++%3C%2Fb%3E%0A%3C%2Fa%3E'
   13     1        NEW                                              $7      'SimpleXMLElement'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $7
   15     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              '%2Fa%2Fb%2Fc%2Fvalue'
          7        DO_FCALL                                      0  $10     
          8        ASSIGN                                                   !2, $10
   16     9        FETCH_DIM_R                                      ~12     !2, 0
         10        ASSIGN                                                   !3, ~12
   17    11      > JMPZ                                                     !3, ->13
   18    12    >   ECHO                                                     'Node%0A'
   20    13    >   FETCH_OBJ_R                                      ~14     !1, 'b'
         14        FETCH_OBJ_R                                      ~15     ~14, 'c'
         15        INIT_METHOD_CALL                                         ~15, 'children'
         16        DO_FCALL                                      0  $16     
         17      > FE_RESET_R                                       $17     $16, ->26
         18    > > FE_FETCH_R                                       ~18     $17, !4, ->26
         19    >   ASSIGN                                                   !5, ~18
   21    20      > JMPZ                                                     !4, ->22
   22    21    >   ECHO                                                     'VALUE%0A'
   24    22    >   INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !4
         24        DO_ICALL                                                 
   20    25      > JMP                                                      ->18
         26    >   FE_FREE                                                  $17
   25    27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.46 ms | 1396 KiB | 15 Q