3v4l.org

run code in 300+ PHP versions simultaneously
<?php // &$a,&$b,&$c,&$d function do_stuff(&$a,&$b,&$c,&$d) { $args = func_get_args(); foreach ($args as &$arg) { $arg += 1; } } $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/e6HXW
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
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 1
   11     1        ASSIGN                                                   !1, 2
   12     2        ASSIGN                                                   !2, 3
   13     3        ASSIGN                                                   !3, 4
   15     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                                                 
   16    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          
   17    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 = 7, Position 2 = 10
Branch analysis from position: 7
2 jumps found. (Code = 126) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/e6HXW
function name:  do_stuff
number of ops:  12
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        FUNC_GET_ARGS                                    ~6      
          5        ASSIGN                                                   !4, ~6
    5     6      > FE_RESET_RW                                      $8      !4, ->10
          7    > > FE_FETCH_RW                                              $8, !5, ->10
    6     8    >   ASSIGN_OP                                     1          !5, 1
    5     9      > JMP                                                      ->7
         10    >   FE_FREE                                                  $8
    8    11      > RETURN                                                   null

End of function do_stuff

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.1 ms | 1394 KiB | 16 Q