3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); function bug(int $test) : \Generator { if (false) { yield 1; } } bug('a');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YLcKS
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'bug'
          1        SEND_VAL                                                 'a'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function bug:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 4
filename:       /in/YLcKS
function name:  bug
number of ops:  5
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        GENERATOR_CREATE                                         
    6     2      > JMPZ                                                     <false>, ->4
    7     3    >   YIELD                                                    1
    9     4    > > GENERATOR_RETURN                                         

End of function bug

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.87 ms | 1396 KiB | 14 Q