3v4l.org

run code in 300+ PHP versions simultaneously
<?php // passing by value function computeValue( $param ){ // Something goes here foreach( $param as $k => $value){ $param[$k] = $value + 1; } return $param; } $x = array(); for( $i =0; $i<99; $i++){ $x[$i] = $i; } // array with 100 elements each incremented by 1 print_r(computeValue( $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/hbA4a
function name:  (null)
number of ops:  15
compiled vars:  !0 = $x, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, <array>
   12     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
   13     3    >   ASSIGN_DIM                                               !0, !1
          4        OP_DATA                                                  !1
   12     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, 99
          7      > JMPNZ                                                    ~6, ->3
   16     8    >   INIT_FCALL                                               'print_r'
          9        INIT_FCALL                                               'computevalue'
         10        SEND_VAR                                                 !0
         11        DO_FCALL                                      0  $7      
         12        SEND_VAR                                                 $7
         13        DO_ICALL                                                 
   18    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/hbA4a
function name:  computeValue
number of ops:  11
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
    9     9      > RETURN                                                   !0
   10    10*     > RETURN                                                   null

End of function computevalue

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.56 ms | 1398 KiB | 16 Q