3v4l.org

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

Function ref:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/1t6um
function name:  ref
number of ops:  3
compiled vars:  !0 = $rhs
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1      > RETURN_BY_REF                                            !0
    5     2*     > RETURN_BY_REF                                            null

End of function ref

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.27 ms | 1397 KiB | 16 Q