3v4l.org

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

Function toto:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EQ1fH
function name:  toto
number of ops:  7
compiled vars:  !0 = $x, !1 = $y, !2 = $tota
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      3
    4     2        ADD                                              ~3      !0, !1
          3        ASSIGN                                                   !2, ~3
    5     4        PRE_INC                                                  !1
    6     5      > RETURN                                                   !2
    7     6*     > RETURN                                                   null

End of function toto

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.89 ms | 1397 KiB | 16 Q