3v4l.org

run code in 300+ PHP versions simultaneously
<?php // passing by reference function computeValue( &$param ){ // Something goes here foreach( $param as $k => $value){ $param[$k] = $value + 1; } } $x = array(); for( $i =0; $i<99; $i++){ $x[$i] = $i; } computeValue( $x); // array with 100 elements each incremented by 1 print_r( $x ); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/8tZQM
function name:  (null)
number of ops:  15
compiled vars:  !0 = $x, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
   11     3    >   ASSIGN_DIM                                               !0, !1
          4        OP_DATA                                                  !1
   10     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, 99
          7      > JMPNZ                                                    ~6, ->3
   13     8    >   INIT_FCALL                                               'computevalue'
          9        SEND_REF                                                 !0
         10        DO_FCALL                                      0          
   16    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
   17    14      > RETURN                                                   1

Function computevalue:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 8
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/8tZQM
function name:  computeValue
number of ops:  10
compiled vars:  !0 = $param, !1 = $value, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1      > FE_RESET_R                                       $3      !0, ->8
          2    > > FE_FETCH_R                                       ~4      $3, !1, ->8
          3    >   ASSIGN                                                   !2, ~4
    6     4        ADD                                              ~7      !1, 1
          5        ASSIGN_DIM                                               !0, !2
          6        OP_DATA                                                  ~7
    5     7      > JMP                                                      ->2
          8    >   FE_FREE                                                  $3
    8     9      > RETURN                                                   null

End of function computevalue

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.64 ms | 1390 KiB | 16 Q