3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=['ref'=>&$a]; $a['val']=$a; var_dump($a); //normal, as expected var_dump(unserialize(serialize($a))); //half-arsed
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eqU8f
function name:  (null)
number of ops:  18
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_ARRAY                                       ~1      !0, 'ref'
          1        ASSIGN                                                   !0, ~1
    4     2        QM_ASSIGN                                        ~4      !0
          3        ASSIGN_DIM                                               !0, 'val'
          4        OP_DATA                                                  ~4
    5     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    7     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'unserialize'
         10        INIT_FCALL                                               'serialize'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                         $7      
         15        SEND_VAR                                                 $7
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.53 ms | 1394 KiB | 19 Q