3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1,2,'foo'=>3,4,5,6,7,8,9,10); $key = '1'; foreach (new LimitIterator(new CallbackFilterIterator(new InfiniteIterator(new ArrayIterator($a)), function($v, $k) use ($key) { static $good = false; $good |= $k === $key; return $good; }), 0, count($a)) as $k => $v) { echo "$k => $v\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 21, Position 2 = 29
Branch analysis from position: 21
2 jumps found. (Code = 78) Position 1 = 22, Position 2 = 29
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/7sdqc
function name:  (null)
number of ops:  31
compiled vars:  !0 = $a, !1 = $key, !2 = $v, !3 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, '1'
    4     2        NEW                                              $6      'LimitIterator'
          3        NEW                                              $7      'CallbackFilterIterator'
          4        NEW                                              $8      'InfiniteIterator'
          5        NEW                                              $9      'ArrayIterator'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
          8        SEND_VAR_NO_REF_EX                                       $9
          9        DO_FCALL                                      0          
         10        SEND_VAR_NO_REF_EX                                       $8
         11        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F7sdqc%3A4%240'
         12        BIND_LEXICAL                                             ~12, !1
         13        SEND_VAL_EX                                              ~12
         14        DO_FCALL                                      0          
         15        SEND_VAR_NO_REF_EX                                       $7
         16        SEND_VAL_EX                                              0
         17        COUNT                                            ~14     !0
         18        SEND_VAL_EX                                              ~14
         19        DO_FCALL                                      0          
         20      > FE_RESET_R                                       $16     $6, ->29
         21    > > FE_FETCH_R                                       ~17     $16, !2, ->29
         22    >   ASSIGN                                                   !3, ~17
    5    23        ROPE_INIT                                     4  ~20     !3
         24        ROPE_ADD                                      1  ~20     ~20, '+%3D%3E+'
         25        ROPE_ADD                                      2  ~20     ~20, !2
         26        ROPE_END                                      3  ~19     ~20, '%0A'
         27        ECHO                                                     ~19
    4    28      > JMP                                                      ->21
         29    >   FE_FREE                                                  $16
    6    30      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F7sdqc%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7sdqc
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $v, !1 = $k, !2 = $key, !3 = $good
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
          3        BIND_STATIC                                              !3
          4        IS_IDENTICAL                                     ~4      !1, !2
          5        ASSIGN_OP                                     9          !3, ~4
          6      > RETURN                                                   !3
          7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F7sdqc%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.89 ms | 1399 KiB | 13 Q