3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a() { yield 0 => 'a'; } function b() { yield '0' => 'b'; } function test($x) { var_dump($x); } test(...a()); echo "\n"; test(...b());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IQBdd
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'test'
          1        INIT_FCALL                                               'a'
          2        DO_FCALL                                      0  $0      
          3        SEND_UNPACK                                              $0
          4        CHECK_UNDEF_ARGS                                         
          5        DO_FCALL                                      1          
   14     6        ECHO                                                     '%0A'
   15     7        INIT_FCALL                                               'test'
          8        INIT_FCALL                                               'b'
          9        DO_FCALL                                      0  $2      
         10        SEND_UNPACK                                              $2
         11        CHECK_UNDEF_ARGS                                         
         12        DO_FCALL                                      1          
         13      > RETURN                                                   1

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/IQBdd
function name:  a
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   GENERATOR_CREATE                                         
    4     1        YIELD                                                    'a', 0
    5     2      > GENERATOR_RETURN                                         

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/IQBdd
function name:  b
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   GENERATOR_CREATE                                         
    7     1        YIELD                                                    'b', '0'
    8     2      > GENERATOR_RETURN                                         

End of function b

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IQBdd
function name:  test
number of ops:  5
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   11     4      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.89 ms | 1008 KiB | 18 Q