3v4l.org

run code in 300+ PHP versions simultaneously
<?php function add_something(&$var, $something) { $result = &$var + $something; return (int)$result; } $chiffre = 1; echo add_something($chiffre,3); echo $chiffre;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nfTnj
function name:  (null)
number of ops:  8
compiled vars:  !0 = $chiffre
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 1
    9     1        INIT_FCALL                                               'add_something'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 3
          4        DO_FCALL                                      0  $2      
          5        ECHO                                                     $2
   10     6        ECHO                                                     !0
          7      > RETURN                                                   1

Function add_something:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nfTnj
function name:  add_something
number of ops:  8
compiled vars:  !0 = $var, !1 = $something, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        ASSIGN_REF                                       $3      !2, !0
          3        ADD                                              ~4      $3, !1
          4        FREE                                                     ~4
    5     5        CAST                                          4  ~5      !2
          6      > RETURN                                                   ~5
    7     7*     > RETURN                                                   null

End of function add_something

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.56 ms | 1389 KiB | 14 Q