3v4l.org

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

Function reffer:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DJFIg
function name:  reffer
number of ops:  3
compiled vars:  !0 = $number
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                            !0      0
    4     1        ASSIGN                                                       !0, 'abc'
    5     2      > RETURN                                                       null

End of function reffer

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
130.63 ms | 519 KiB | 12 Q