3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); function byref_function(&$a, &$b) { $a = 2; $b = 1; } $array = array(1, 2); call_user_func_array('byref_function', $array); var_dump($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sl0Pd
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
   10     3        ASSIGN                                                   !0, <array>
   12     4        INIT_FCALL                                               'byref_function'
          5        SEND_ARRAY                                               !0
          6        CHECK_UNDEF_ARGS                                         
          7        DO_FCALL                                      0          
   14     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function byref_function:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sl0Pd
function name:  byref_function
number of ops:  5
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        ASSIGN                                                   !0, 2
    7     3        ASSIGN                                                   !1, 1
    8     4      > RETURN                                                   null

End of function byref_function

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.37 ms | 1397 KiB | 18 Q