3v4l.org

run code in 300+ PHP versions simultaneously
<?php // &$a,&$b,&$c,&$d function do_stuff(&$a,&$b,&$c,&$d) { $a += 1; $b += 1; $c += 1; $d += 1; $args = func_get_args(); foreach ($args as &$arg) { $arg += 1; } print_r(array($a, $b, $c, $d)); } $a = 1; $b = 2; $c = 3; $d = 4; print_r(array($a,$b,$c,$d)); do_stuff($a,$b,$c,$d); print_r(array($a,$b,$c,$d));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b9OoP
function name:  (null)
number of ops:  25
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ASSIGN                                                   !0, 1
   16     1        ASSIGN                                                   !1, 2
   17     2        ASSIGN                                                   !2, 3
   18     3        ASSIGN                                                   !3, 4
   20     4        INIT_FCALL                                               'print_r'
          5        INIT_ARRAY                                       ~8      !0
          6        ADD_ARRAY_ELEMENT                                ~8      !1
          7        ADD_ARRAY_ELEMENT                                ~8      !2
          8        ADD_ARRAY_ELEMENT                                ~8      !3
          9        SEND_VAL                                                 ~8
         10        DO_ICALL                                                 
   21    11        INIT_FCALL                                               'do_stuff'
         12        SEND_REF                                                 !0
         13        SEND_REF                                                 !1
         14        SEND_REF                                                 !2
         15        SEND_REF                                                 !3
         16        DO_FCALL                                      0          
   22    17        INIT_FCALL                                               'print_r'
         18        INIT_ARRAY                                       ~11     !0
         19        ADD_ARRAY_ELEMENT                                ~11     !1
         20        ADD_ARRAY_ELEMENT                                ~11     !2
         21        ADD_ARRAY_ELEMENT                                ~11     !3
         22        SEND_VAL                                                 ~11
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Function do_stuff:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
2 jumps found. (Code = 126) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/b9OoP
function name:  do_stuff
number of ops:  23
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d, !4 = $args, !5 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    4     4        ASSIGN_OP                                     1          !0, 1
    5     5        ASSIGN_OP                                     1          !1, 1
    6     6        ASSIGN_OP                                     1          !2, 1
    7     7        ASSIGN_OP                                     1          !3, 1
    8     8        FUNC_GET_ARGS                                    ~10     
          9        ASSIGN                                                   !4, ~10
    9    10      > FE_RESET_RW                                      $12     !4, ->14
         11    > > FE_FETCH_RW                                              $12, !5, ->14
   10    12    >   ASSIGN_OP                                     1          !5, 1
    9    13      > JMP                                                      ->11
         14    >   FE_FREE                                                  $12
   12    15        INIT_FCALL                                               'print_r'
         16        INIT_ARRAY                                       ~14     !0
         17        ADD_ARRAY_ELEMENT                                ~14     !1
         18        ADD_ARRAY_ELEMENT                                ~14     !2
         19        ADD_ARRAY_ELEMENT                                ~14     !3
         20        SEND_VAL                                                 ~14
         21        DO_ICALL                                                 
   13    22      > RETURN                                                   null

End of function do_stuff

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
134.7 ms | 1403 KiB | 16 Q