3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(gc_enabled()); $objstore = new SplObjectStorage(); $a = new StdClass; $b = new StdClass; $a->b = $b; $objstore->attach($a); $objstore->attach($b); 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/fDtin
function name:  (null)
number of ops:  32
compiled vars:  !0 = $objstore, !1 = $a, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'gc_enabled'
          2        DO_ICALL                                         $3      
          3        SEND_VAR                                                 $3
          4        DO_ICALL                                                 
    3     5        NEW                                              $5      'SplObjectStorage'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $5
    4     8        NEW                                              $8      'StdClass'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $8
    5    11        NEW                                              $11     'StdClass'
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !2, $11
    6    14        ASSIGN_OBJ                                               !1, 'b'
         15        OP_DATA                                                  !2
    8    16        INIT_METHOD_CALL                                         !0, 'attach'
         17        SEND_VAR_EX                                              !1
         18        DO_FCALL                                      0          
    9    19        INIT_METHOD_CALL                                         !0, 'attach'
         20        SEND_VAR_EX                                              !2
         21        DO_FCALL                                      0          
   11    22        INIT_FCALL                                               'gc_collect_cycles'
         23        DO_ICALL                                                 
   13    24        INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                                 
   15    27        INIT_FCALL                                               'serialize'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                         $19     
         30        ECHO                                                     $19
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.94 ms | 1400 KiB | 21 Q