3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f(Traversable $x) { foreach ($x as $k => $v){ echo $v; } } $a = json_decode('{"a": 1, "b": 2, "c": 3}'); $arrayobject = new ArrayObject($a); f($arrayobject);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kPNGF
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a, !1 = $arrayobject
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'json_decode'
          1        SEND_VAL                                                 '%7B%22a%22%3A+1%2C+%22b%22%3A+2%2C+%22c%22%3A+3%7D'
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
   10     4        NEW                                              $4      'ArrayObject'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $4
   12     8        INIT_FCALL                                               'f'
          9        SEND_VAR                                                 !1
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 6
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/kPNGF
function name:  f
number of ops:  8
compiled vars:  !0 = $x, !1 = $v, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1      > FE_RESET_R                                       $3      !0, ->6
          2    > > FE_FETCH_R                                       ~4      $3, !1, ->6
          3    >   ASSIGN                                                   !2, ~4
    5     4        ECHO                                                     !1
    4     5      > JMP                                                      ->2
          6    >   FE_FREE                                                  $3
    7     7      > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.77 ms | 1398 KiB | 16 Q