3v4l.org

run code in 300+ PHP versions simultaneously
<?php function modifyArray (&$array) { foreach ($array as &$value) { $value = $value + 2; } echo $value; $value = $value + 3; } $array = array (1, 2, 3); modifyArray($array); print_r($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aQhG2
function name:  (null)
number of ops:  8
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, <array>
   13     1        INIT_FCALL                                               'modifyarray'
          2        SEND_REF                                                 !0
          3        DO_FCALL                                      0          
   14     4        INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function modifyarray:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 6
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/aQhG2
function name:  modifyArray
number of ops:  11
compiled vars:  !0 = $array, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1      > FE_RESET_RW                                      $2      !0, ->6
          2    > > FE_FETCH_RW                                              $2, !1, ->6
    7     3    >   ADD                                              ~3      !1, 2
          4        ASSIGN                                                   !1, ~3
    5     5      > JMP                                                      ->2
          6    >   FE_FREE                                                  $2
    9     7        ECHO                                                     !1
   10     8        ADD                                              ~5      !1, 3
          9        ASSIGN                                                   !1, ~5
   11    10      > RETURN                                                   null

End of function modifyarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.39 ms | 1398 KiB | 16 Q