3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = null; // initialise an array with reference set $s = 'some string'; $a[] =& $s; $a[] =& $s; $a[] =& $s; $s =& $n; // so the reference count is clear debug_zval_dump($a); var_dump(apc_store('a', $a)); $a = apc_fetch('a'); // modifiy it $s =& $a[0]; $s = 'other string'; $s = & $n; debug_zval_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mK0Xq
function name:  (null)
number of ops:  31
compiled vars:  !0 = $n, !1 = $s, !2 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, null
    5     1        ASSIGN                                                   !1, 'some+string'
    6     2        FETCH_DIM_W                                      $5      !2
          3        ASSIGN_REF                                               $5, !1
    7     4        FETCH_DIM_W                                      $7      !2
          5        ASSIGN_REF                                               $7, !1
    8     6        FETCH_DIM_W                                      $9      !2
          7        ASSIGN_REF                                               $9, !1
    9     8        ASSIGN_REF                                               !1, !0
   11     9        INIT_FCALL                                               'debug_zval_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
   12    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL_BY_NAME                                       'apc_store'
         14        SEND_VAL_EX                                              'a'
         15        SEND_VAR_EX                                              !2
         16        DO_FCALL                                      0  $13     
         17        SEND_VAR                                                 $13
         18        DO_ICALL                                                 
   13    19        INIT_FCALL_BY_NAME                                       'apc_fetch'
         20        SEND_VAL_EX                                              'a'
         21        DO_FCALL                                      0  $15     
         22        ASSIGN                                                   !2, $15
   16    23        FETCH_DIM_W                                      $17     !2, 0
         24        ASSIGN_REF                                               !1, $17
   17    25        ASSIGN                                                   !1, 'other+string'
   18    26        ASSIGN_REF                                               !1, !0
   20    27        INIT_FCALL                                               'debug_zval_dump'
         28        SEND_VAR                                                 !2
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.13 ms | 1395 KiB | 17 Q