3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static $cache = []; } function foo() { $t = new stdClass(); Foo::$cache[] = $t; $t->foo = $t; $tt = unserialize(serialize($t)); } foo(); gc_collect_cycles();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u6JbF
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'foo'
          1        DO_FCALL                                      0          
   16     2        INIT_FCALL                                               'gc_collect_cycles'
          3        DO_ICALL                                                 
          4      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u6JbF
function name:  foo
number of ops:  16
compiled vars:  !0 = $t, !1 = $tt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $2      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    9     3        FETCH_STATIC_PROP_W          unknown             $5      'cache'
          4        ASSIGN_DIM                                               $5
          5        OP_DATA                                                  !0
   10     6        ASSIGN_OBJ                                               !0, 'foo'
          7        OP_DATA                                                  !0
   12     8        INIT_FCALL                                               'unserialize'
          9        INIT_FCALL                                               'serialize'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $8      
         12        SEND_VAR                                                 $8
         13        DO_ICALL                                         $9      
         14        ASSIGN                                                   !1, $9
   13    15      > RETURN                                                   null

End of function foo

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.65 ms | 1397 KiB | 20 Q