3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( 'property1' => 'value1', 'property200' => new ArrayIterator(array('test' => 'test'))); var_dump(spl_object_hash($data['property200'])); function test($data) { foreach ($data as $key => $prop) { if (is_object($data)) { var_dump(spl_object_hash($data)); } var_dump($key, $prop); if ($prop instanceof ArrayIterator) { test($prop); } } } test($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A1h30
function name:  (null)
number of ops:  17
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_ARRAY                                       ~1      'value1', 'property1'
          1        NEW                                              $2      'ArrayIterator'
          2        SEND_VAL_EX                                              <array>
          3        DO_FCALL                                      0          
          4        ADD_ARRAY_ELEMENT                                ~1      $2, 'property200'
          5        ASSIGN                                                   !0, ~1
          6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'spl_object_hash'
          8        FETCH_DIM_R                                      ~5      !0, 'property200'
          9        SEND_VAL                                                 ~5
         10        DO_ICALL                                         $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                                 
         13        INIT_FCALL                                               'test'
         14        SEND_VAR                                                 !0
         15        DO_FCALL                                      0          
         16      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 22
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 22
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 21
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 21
Branch analysis from position: 12
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/A1h30
function name:  test
number of ops:  24
compiled vars:  !0 = $data, !1 = $prop, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1      > FE_RESET_R                                       $3      !0, ->22
          2    > > FE_FETCH_R                                       ~4      $3, !1, ->22
          3    >   ASSIGN                                                   !2, ~4
          4        TYPE_CHECK                                  256          !0
          5      > JMPZ                                                     ~6, ->12
          6    >   INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'spl_object_hash'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $7      
         10        SEND_VAR                                                 $7
         11        DO_ICALL                                                 
         12    >   INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !2
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
         16        INSTANCEOF                                               !1, 'ArrayIterator'
         17      > JMPZ                                                     ~10, ->21
         18    >   INIT_FCALL_BY_NAME                                       'test'
         19        SEND_VAR_EX                                              !1
         20        DO_FCALL                                      0          
         21    > > JMP                                                      ->2
         22    >   FE_FREE                                                  $3
         23      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.3 ms | 1403 KiB | 18 Q