3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { $f = function () { $a = 1; yield from $a; }; foreach($f() as $var) { var_dump($var); } } catch(Throwable $e) { var_dump($e); }
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 = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
Found catch point at position: 12
Branch analysis from position: 12
2 jumps found. (Code = 107) Position 1 = 13, Position 2 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/riXJp
function name:  (null)
number of ops:  17
compiled vars:  !0 = $f, !1 = $var, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FriXJp%3A5%240'
          1        ASSIGN                                                   !0, ~3
    9     2        INIT_DYNAMIC_CALL                                        !0
          3        DO_FCALL                                      0  $5      
          4      > FE_RESET_R                                       $6      $5, ->10
          5    > > FE_FETCH_R                                               $6, !1, ->10
   10     6    >   INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    9     9      > JMP                                                      ->5
         10    >   FE_FREE                                                  $6
         11      > JMP                                                      ->16
   12    12  E > > CATCH                                       last         'Throwable'
         13    >   INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
         16    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FriXJp%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/riXJp
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   GENERATOR_CREATE                                         
    6     1        ASSIGN                                                   !0, 1
    7     2        YIELD_FROM                                       ~2      !0
          3        FREE                                                     ~2
    8     4      > GENERATOR_RETURN                                         

End of function %00%7Bclosure%7D%2Fin%2FriXJp%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.13 ms | 1396 KiB | 15 Q