3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrayIterator = new ArrayIterator(array('key 1' => 'value 1', 'key 2' => array('value 2'))); $regexIterator = new RegexIterator($arrayIterator, '/^key/', RegexIterator::MATCH, RegexIterator::USE_KEY); foreach ($regexIterator as $key => $value) { var_dump($key, $value); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 19
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/EmbIN
function name:  (null)
number of ops:  21
compiled vars:  !0 = $arrayIterator, !1 = $regexIterator, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'ArrayIterator'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    4     4        NEW                                              $7      'RegexIterator'
          5        SEND_VAR_EX                                              !0
          6        SEND_VAL_EX                                              '%2F%5Ekey%2F'
          7        SEND_VAL_EX                                              0
          8        SEND_VAL_EX                                              1
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $7
    6    11      > FE_RESET_R                                       $10     !1, ->19
         12    > > FE_FETCH_R                                       ~11     $10, !2, ->19
         13    >   ASSIGN                                                   !3, ~11
    7    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !3
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
    6    18      > JMP                                                      ->12
         19    >   FE_FREE                                                  $10
    8    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.86 ms | 1004 KiB | 14 Q