3v4l.org

run code in 300+ PHP versions simultaneously
<?php $object = new stdClass; $object->property1 = 'property 1'; $object->property2 = 'property 2'; $array = array( array('pear', 'apple'), array('banana', 'coconut'), 'orange', // This is not an array element $object ); $iterator = new RecursiveArrayIterator($array); foreach(new RecursiveIteratorIterator($iterator) as $value) { echo $value . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 24
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 24
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/RNKd1
function name:  (null)
number of ops:  26
compiled vars:  !0 = $object, !1 = $array, !2 = $iterator, !3 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    4     3        ASSIGN_OBJ                                               !0, 'property1'
          4        OP_DATA                                                  'property+1'
    5     5        ASSIGN_OBJ                                               !0, 'property2'
          6        OP_DATA                                                  'property+2'
    8     7        INIT_ARRAY                                       ~9      <array>
          8        ADD_ARRAY_ELEMENT                                ~9      <array>
   10     9        ADD_ARRAY_ELEMENT                                ~9      'orange'
   11    10        ADD_ARRAY_ELEMENT                                ~9      !0
    7    11        ASSIGN                                                   !1, ~9
   14    12        NEW                                              $11     'RecursiveArrayIterator'
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0          
         15        ASSIGN                                                   !2, $11
   16    16        NEW                                              $14     'RecursiveIteratorIterator'
         17        SEND_VAR_EX                                              !2
         18        DO_FCALL                                      0          
         19      > FE_RESET_R                                       $16     $14, ->24
         20    > > FE_FETCH_R                                               $16, !3, ->24
   17    21    >   CONCAT                                           ~17     !3, '%0A'
         22        ECHO                                                     ~17
   16    23      > JMP                                                      ->20
         24    >   FE_FREE                                                  $16
   18    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.6 ms | 1394 KiB | 13 Q