3v4l.org

run code in 500+ PHP versions simultaneously
<?php $it = (function () { if (false) { yield 'foo'; }})(); var_dump($it->valid()); foreach ($it as $k => $v) { var_dump($k, $v); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 17
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/2E7EJ
function name:  (null)
number of ops:  19
compiled vars:  !0 = $it, !1 = $v, !2 = $k
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                              ~3      [0]
          1        INIT_DYNAMIC_CALL                                            ~3
          2        DO_FCALL                                          0  $4      
          3        ASSIGN                                                       !0, $4
    5     4        INIT_FCALL                                                   'var_dump'
          5        INIT_METHOD_CALL                                             !0, 'valid'
          6        DO_FCALL                                          0  $6      
          7        SEND_VAR                                                     $6
          8        DO_ICALL                                                     
    7     9      > FE_RESET_R                                           $8      !0, ->17
         10    > > FE_FETCH_R                                           ~9      $8, !1, ->17
         11    >   ASSIGN                                                       !2, ~9
         12        INIT_FCALL                                                   'var_dump'
         13        SEND_VAR                                                     !2
         14        SEND_VAR                                                     !1
         15        DO_ICALL                                                     
         16      > JMP                                                          ->10
         17    >   FE_FREE                                                      $8
         18      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 3
Branch analysis from position: 2
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 3
filename:       /in/2E7EJ
function name:  {closure:/in/2E7EJ:3}
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   GENERATOR_CREATE                                             
          1      > JMPZ                                                         <false>, ->3
          2    >   YIELD                                                        'foo'
          3    > > GENERATOR_RETURN                                             

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
176.02 ms | 2123 KiB | 14 Q