3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar(&$data) { $data['baz'] = 'test'; } } call_user_func_array(['Foo', 'bar'], [&$data]); var_dump($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EKn96
function name:  (null)
number of ops:  9
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_USER_CALL                                0          'call_user_func_array', <array>
          1        INIT_ARRAY                                       ~1      !0
          2        SEND_ARRAY                                               ~1
          3        CHECK_UNDEF_ARGS                                         
          4        DO_FCALL                                      0          
   12     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EKn96
function name:  bar
number of ops:  4
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        ASSIGN_DIM                                               !0, 'baz'
          2        OP_DATA                                                  'test'
    8     3      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.29 ms | 1394 KiB | 15 Q