3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen() { if (false || yield) { yield 'true'; return; } yield 'false'; return; } var_dump(gen()->send(true));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8tkt2
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'gen'
          2        DO_FCALL                                      0  $0      
          3        INIT_METHOD_CALL                                         $0, 'send'
          4        SEND_VAL_EX                                              <true>
          5        DO_FCALL                                      0  $1      
          6        SEND_VAR                                                 $1
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function gen:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/8tkt2
function name:  gen
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   GENERATOR_CREATE                                         
    4     1        YIELD                                            $0      
          2        BOOL                                             ~1      $0
          3      > JMPZ                                                     ~1, ->6
    5     4    >   YIELD                                                    'true'
    6     5      > GENERATOR_RETURN                                         
    9     6    >   YIELD                                                    'false'
   10     7      > GENERATOR_RETURN                                         
   11     8*     > GENERATOR_RETURN                                         

End of function gen

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.38 ms | 1397 KiB | 16 Q