3v4l.org

run code in 300+ PHP versions simultaneously
<?php $generator = call_user_func(function & () { $t = range(1, 10); foreach($t as $i) yield $i; }); $generator->rewind(); $t =& $generator->current(); var_dump($t);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GDNLr
function name:  (null)
number of ops:  13
compiled vars:  !0 = $generator, !1 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FGDNLr%3A3%240'
          1        INIT_USER_CALL                                0          'call_user_func', ~2
          2        DO_FCALL                                      0  $3      
          3        ASSIGN                                                   !0, $3
    5     4        INIT_METHOD_CALL                                         !0, 'rewind'
          5        DO_FCALL                                      0          
    7     6        INIT_METHOD_CALL                                         !0, 'current'
          7        DO_FCALL                                      0  $6      
          8        ASSIGN_REF                                               !1, $6
    9     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FGDNLr%3A3%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 10
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 10
filename:       /in/GDNLr
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $t, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   GENERATOR_CREATE                                         
          1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 10
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !0, $2
          6      > FE_RESET_R                                       $4      !0, ->10
          7    > > FE_FETCH_R                                               $4, !1, ->10
          8    >   YIELD                                                    !1
          9      > JMP                                                      ->7
         10    >   FE_FREE                                                  $4
         11      > GENERATOR_RETURN                                         

End of function %00%7Bclosure%7D%2Fin%2FGDNLr%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.56 ms | 1396 KiB | 17 Q