3v4l.org

run code in 300+ PHP versions simultaneously
<?php $teste = new stdClass(); $teste->a = 1; $teste->b = 2; function test_func($input){ foreach( $input as $key => $value ){ $input[$key] = $value++; var_dump($key, $value); } return $input; } test_func($teste); var_dump($teste);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t76ZK
function name:  (null)
number of ops:  14
compiled vars:  !0 = $teste
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    5     3        ASSIGN_OBJ                                               !0, 'a'
          4        OP_DATA                                                  1
    6     5        ASSIGN_OBJ                                               !0, 'b'
          6        OP_DATA                                                  2
   18     7        INIT_FCALL                                               'test_func'
          8        SEND_VAR                                                 !0
          9        DO_FCALL                                      0          
   20    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Function test_func:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 12
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/t76ZK
function name:  test_func
number of ops:  15
compiled vars:  !0 = $input, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1      > FE_RESET_R                                       $3      !0, ->12
          2    > > FE_FETCH_R                                       ~4      $3, !1, ->12
          3    >   ASSIGN                                                   !2, ~4
   11     4        POST_INC                                         ~7      !1
          5        ASSIGN_DIM                                               !0, !2
          6        OP_DATA                                                  ~7
   12     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !2
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
   10    11      > JMP                                                      ->2
         12    >   FE_FREE                                                  $3
   15    13      > RETURN                                                   !0
   16    14*     > RETURN                                                   null

End of function test_func

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.06 ms | 1399 KiB | 16 Q