3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($arg) { echo 1; echo $arg; yield; echo 2; echo $arg; } test('A'); test('B');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wrql0
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'test'
          1        SEND_VAL                                                 'A'
          2        DO_FCALL                                      0          
   14     3        INIT_FCALL                                               'test'
          4        SEND_VAL                                                 'B'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.39 ms | 1397 KiB | 15 Q