3v4l.org

run code in 300+ PHP versions simultaneously
<?php class XXX{ public function w(){ return [1,2,3]; } } function test(...$args) { var_dump($args); } $tmp = new XXX(); test(...$tmp->w());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mjQcF
function name:  (null)
number of ops:  10
compiled vars:  !0 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'XXX'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   11     3        INIT_FCALL                                               'test'
          4        INIT_METHOD_CALL                                         !0, 'w'
          5        DO_FCALL                                      0  $4      
          6        SEND_UNPACK                                              $4
          7        CHECK_UNDEF_ARGS                                         
          8        DO_FCALL                                      1          
          9      > RETURN                                                   1

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

End of function test

Class XXX:
Function w:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mjQcF
function name:  w
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   <array>
    6     1*     > RETURN                                                   null

End of function w

End of class XXX.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.16 ms | 1398 KiB | 16 Q