3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ze_range($start) { for ($i = $start; $i < 10; $i++) { if($i < 5) { yield $i; } } } count(ze_range(3));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WOsAB
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'ze_range'
          1        SEND_VAL                                                 3
          2        DO_FCALL                                      0  $0      
          3        COUNT                                            ~1      $0
          4        FREE                                                     ~1
          5      > RETURN                                                   1

Function ze_range:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 4
Branch analysis from position: 10
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 4
Branch analysis from position: 10
Branch analysis from position: 4
Branch analysis from position: 7
filename:       /in/WOsAB
function name:  ze_range
number of ops:  11
compiled vars:  !0 = $start, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        GENERATOR_CREATE                                         
    5     2        ASSIGN                                                   !1, !0
          3      > JMP                                                      ->8
    7     4    >   IS_SMALLER                                               !1, 5
          5      > JMPZ                                                     ~3, ->7
    9     6    >   YIELD                                                    !1
    5     7    >   PRE_INC                                                  !1
          8    >   IS_SMALLER                                               !1, 10
          9      > JMPNZ                                                    ~6, ->4
   12    10    > > GENERATOR_RETURN                                         

End of function ze_range

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.34 ms | 1398 KiB | 14 Q