3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a= & $_POST; $a=array(); function isRef($var) { $info = getZvalRefCountInfo($var); return (boolean) $info['is_ref']; } var_dump(isRef($a));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u8Rgp
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_W                      global              $1      '_POST'
          1        ASSIGN_REF                                               !0, $1
    4     2        ASSIGN                                                   !0, <array>
   11     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'isref'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function isref:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u8Rgp
function name:  isRef
number of ops:  9
compiled vars:  !0 = $var, !1 = $info
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_FCALL_BY_NAME                                       'getZvalRefCountInfo'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !1, $2
    8     5        FETCH_DIM_R                                      ~4      !1, 'is_ref'
          6        BOOL                                             ~5      ~4
          7      > RETURN                                                   ~5
    9     8*     > RETURN                                                   null

End of function isref

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.75 ms | 1397 KiB | 16 Q