3v4l.org

run code in 300+ PHP versions simultaneously
<?php function increment($val, $increment = 2) { for ($i = 1; $i <= $increment; $i++) { $val++; } return $val; } $var = increment('a'); var_dump($var);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XNNQQe
function name:  (null)
number of ops:  8
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'increment'
          1        SEND_VAL                                                 'a'
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
   12     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function increment:
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 = 4
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 4
Branch analysis from position: 8
Branch analysis from position: 4
filename:       /in/XNNQQe
function name:  increment
number of ops:  10
compiled vars:  !0 = $val, !1 = $increment, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      2
    5     2        ASSIGN                                                   !2, 1
          3      > JMP                                                      ->6
    6     4    >   PRE_INC                                                  !0
    5     5        PRE_INC                                                  !2
          6    >   IS_SMALLER_OR_EQUAL                                      !2, !1
          7      > JMPNZ                                                    ~6, ->4
    9     8    > > RETURN                                                   !0
   10     9*     > RETURN                                                   null

End of function increment

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.85 ms | 1398 KiB | 16 Q