3v4l.org

run code in 300+ PHP versions simultaneously
<?php function add_something(&$var, $something) { $result = $var + $something; return (int)$result; } $number = 1; echo add_something($number,3); echo $number;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1XYX3
function name:  (null)
number of ops:  8
compiled vars:  !0 = $number
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/1XYX3
function name:  add_something
number of ops:  7
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        ADD                                              ~3      !0, !1
          3        ASSIGN                                                   !2, ~3
    5     4        CAST                                          4  ~5      !2
          5      > RETURN                                                   ~5
    7     6*     > RETURN                                                   null

End of function add_something

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.46 ms | 1389 KiB | 14 Q