3v4l.org

run code in 300+ PHP versions simultaneously
<?php function iter() { static $x = 200; var_dump($x); foreach ([1, 2, 3] as $x) { var_dump($x); } } iter(); iter();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ce28K
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'iter'
          1        DO_FCALL                                      0          
   13     2        INIT_FCALL                                               'iter'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function iter:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/ce28K
function name:  iter
number of ops:  12
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   BIND_STATIC                                              !0
    5     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    7     4      > FE_RESET_R                                       $2      <array>, ->10
          5    > > FE_FETCH_R                                               $2, !0, ->10
    8     6    >   INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
    7     9      > JMP                                                      ->5
         10    >   FE_FREE                                                  $2
   10    11      > RETURN                                                   null

End of function iter

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
193.12 ms | 1397 KiB | 17 Q