3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(gc_enabled()); $objstore = new SplObjectStorage(); $a = new StdClass; $b = new StdClass; $c = new StdClass; $a->b = $b; $b->a = $a; $c->b = $b; $b->c = $c; $objstore->attach($a); $objstore->attach($b); $objstore->attach($c); gc_collect_cycles(); var_dump($objstore); print serialize($objstore);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6NVAI
function name:  (null)
number of ops:  44
compiled vars:  !0 = $objstore, !1 = $a, !2 = $b, !3 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'gc_enabled'
          2        DO_ICALL                                         $4      
          3        SEND_VAR                                                 $4
          4        DO_ICALL                                                 
    3     5        NEW                                              $6      'SplObjectStorage'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $6
    4     8        NEW                                              $9      'StdClass'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $9
    5    11        NEW                                              $12     'StdClass'
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !2, $12
    6    14        NEW                                              $15     'StdClass'
         15        DO_FCALL                                      0          
         16        ASSIGN                                                   !3, $15
    8    17        ASSIGN_OBJ                                               !1, 'b'
         18        OP_DATA                                                  !2
    9    19        ASSIGN_OBJ                                               !2, 'a'
         20        OP_DATA                                                  !1
   10    21        ASSIGN_OBJ                                               !3, 'b'
         22        OP_DATA                                                  !2
   11    23        ASSIGN_OBJ                                               !2, 'c'
         24        OP_DATA                                                  !3
   13    25        INIT_METHOD_CALL                                         !0, 'attach'
         26        SEND_VAR_EX                                              !1
         27        DO_FCALL                                      0          
   14    28        INIT_METHOD_CALL                                         !0, 'attach'
         29        SEND_VAR_EX                                              !2
         30        DO_FCALL                                      0          
   15    31        INIT_METHOD_CALL                                         !0, 'attach'
         32        SEND_VAR_EX                                              !3
         33        DO_FCALL                                      0          
   17    34        INIT_FCALL                                               'gc_collect_cycles'
         35        DO_ICALL                                                 
   19    36        INIT_FCALL                                               'var_dump'
         37        SEND_VAR                                                 !0
         38        DO_ICALL                                                 
   21    39        INIT_FCALL                                               'serialize'
         40        SEND_VAR                                                 !0
         41        DO_ICALL                                         $27     
         42        ECHO                                                     $27
         43      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.53 ms | 1388 KiB | 21 Q