3v4l.org

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

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

End of function r

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.89 ms | 1397 KiB | 16 Q