3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(1); $reference =& $array[0]; echo $array[0], '<br>'; theFunction($array); echo $array[0], '<br>'; function theFunction($array) { $array[0] = 2; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aDRj3
function name:  (null)
number of ops:  13
compiled vars:  !0 = $array, !1 = $reference
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    6     1        FETCH_DIM_W                                      $3      !0, 0
          2        ASSIGN_REF                                               !1, $3
    8     3        FETCH_DIM_R                                      ~5      !0, 0
          4        ECHO                                                     ~5
          5        ECHO                                                     '%3Cbr%3E'
    9     6        INIT_FCALL_BY_NAME                                       'theFunction'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
   11     9        FETCH_DIM_R                                      ~7      !0, 0
         10        ECHO                                                     ~7
         11        ECHO                                                     '%3Cbr%3E'
   17    12      > RETURN                                                   1

Function thefunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aDRj3
function name:  theFunction
number of ops:  4
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        ASSIGN_DIM                                               !0, 0
          2        OP_DATA                                                  2
   15     3      > RETURN                                                   null

End of function thefunction

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.58 ms | 1393 KiB | 13 Q