3v4l.org

run code in 300+ PHP versions simultaneously
<?php function byRef(&$apples) { $apples++; } $oranges = 5; $apples = 5; byRef($oranges); echo "I have $apples apples and $oranges oranges"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SUQ03
function name:  (null)
number of ops:  12
compiled vars:  !0 = $oranges, !1 = $apples
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 5
    7     1        ASSIGN                                                   !1, 5
    8     2        INIT_FCALL                                               'byref'
          3        SEND_REF                                                 !0
          4        DO_FCALL                                      0          
    9     5        ROPE_INIT                                     5  ~6      'I+have+'
          6        ROPE_ADD                                      1  ~6      ~6, !1
          7        ROPE_ADD                                      2  ~6      ~6, '+apples+and+'
          8        ROPE_ADD                                      3  ~6      ~6, !0
          9        ROPE_END                                      4  ~5      ~6, '+oranges'
         10        ECHO                                                     ~5
   10    11      > RETURN                                                   1

Function byref:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SUQ03
function name:  byRef
number of ops:  3
compiled vars:  !0 = $apples
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        PRE_INC                                                  !0
    5     2      > RETURN                                                   null

End of function byref

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.9 ms | 1397 KiB | 14 Q