3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=array( 'notices' => array( 'a','b','c' ) ); $xml = new SimpleXMLElement('<root/>'); array_walk_recursive($a, array ($xml, 'addChild')); //var_dump($xml->nichts->hasChildren()); $b = $xml->nichts->children(); print_r($b->count()); if ($b) { foreach ($b as $c) { //n } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 25
Branch analysis from position: 21
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 24
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
Branch analysis from position: 25
filename:       /in/Tst4M
function name:  (null)
number of ops:  26
compiled vars:  !0 = $a, !1 = $xml, !2 = $b, !3 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        NEW                                              $5      'SimpleXMLElement'
          2        SEND_VAL_EX                                              '%3Croot%2F%3E'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $5
   10     5        INIT_FCALL                                               'array_walk_recursive'
          6        SEND_REF                                                 !0
          7        INIT_ARRAY                                       ~8      !1
          8        ADD_ARRAY_ELEMENT                                ~8      'addChild'
          9        SEND_VAL                                                 ~8
         10        DO_ICALL                                                 
   12    11        FETCH_OBJ_R                                      ~10     !1, 'nichts'
         12        INIT_METHOD_CALL                                         ~10, 'children'
         13        DO_FCALL                                      0  $11     
         14        ASSIGN                                                   !2, $11
   13    15        INIT_FCALL                                               'print_r'
         16        INIT_METHOD_CALL                                         !2, 'count'
         17        DO_FCALL                                      0  $13     
         18        SEND_VAR                                                 $13
         19        DO_ICALL                                                 
   14    20      > JMPZ                                                     !2, ->25
   15    21    > > FE_RESET_R                                       $15     !2, ->24
         22    > > FE_FETCH_R                                               $15, !3, ->24
         23    > > JMP                                                      ->22
         24    >   FE_FREE                                                  $15
   18    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.24 ms | 1395 KiB | 17 Q