3v4l.org

run code in 300+ PHP versions simultaneously
<?php $execute = function ($n){ foreach($n as $a) { yield $a; } }; var_dump($execute); /*foreach(execute([1,2,5]) as $n){ echo $n.PHP_EOL; }*/
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6IsQW
function name:  (null)
number of ops:  6
compiled vars:  !0 = $execute
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F6IsQW%3A2%240'
          1        ASSIGN                                                   !0, ~1
    8     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
   12     5      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F6IsQW%3A2%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 6
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 6
filename:       /in/6IsQW
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $n, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        GENERATOR_CREATE                                         
    3     2      > FE_RESET_R                                       $2      !0, ->6
          3    > > FE_FETCH_R                                               $2, !1, ->6
    4     4    >   YIELD                                                    !1
    3     5      > JMP                                                      ->3
          6    >   FE_FREE                                                  $2
    6     7      > GENERATOR_RETURN                                         

End of function %00%7Bclosure%7D%2Fin%2F6IsQW%3A2%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.24 ms | 1395 KiB | 15 Q