3v4l.org

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

Function %00%7Bclosure%7D%2Fin%2Fl7mCG%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/l7mCG
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%2Fl7mCG%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.13 ms | 1395 KiB | 15 Q