3v4l.org

run code in 300+ PHP versions simultaneously
<?php function out() { while ($v = yield) { var_export($v); print "\n"; } print "Close\n"; } $out = out(); $out->send('A'); $out->send('B'); $out->send(NULL); $out->send('C');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bJMik
function name:  (null)
number of ops:  16
compiled vars:  !0 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'out'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   12     3        INIT_METHOD_CALL                                         !0, 'send'
          4        SEND_VAL_EX                                              'A'
          5        DO_FCALL                                      0          
   13     6        INIT_METHOD_CALL                                         !0, 'send'
          7        SEND_VAL_EX                                              'B'
          8        DO_FCALL                                      0          
   14     9        INIT_METHOD_CALL                                         !0, 'send'
         10        SEND_VAL_EX                                              null
         11        DO_FCALL                                      0          
   15    12        INIT_METHOD_CALL                                         !0, 'send'
         13        SEND_VAL_EX                                              'C'
         14        DO_FCALL                                      0          
         15      > RETURN                                                   1

Function out:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 2
Branch analysis from position: 9
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 2
Branch analysis from position: 9
Branch analysis from position: 2
filename:       /in/bJMik
function name:  out
number of ops:  11
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   GENERATOR_CREATE                                         
    4     1      > JMP                                                      ->6
    5     2    >   INIT_FCALL                                               'var_export'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
    6     5        ECHO                                                     '%0A'
    4     6    >   YIELD                                            $2      
          7        ASSIGN                                           ~3      !0, $2
          8      > JMPNZ                                                    ~3, ->2
    8     9    >   ECHO                                                     'Close%0A'
    9    10      > GENERATOR_RETURN                                         

End of function out

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.39 ms | 1399 KiB | 16 Q