3v4l.org

run code in 300+ PHP versions simultaneously
<?php gc_enable(); class test { public $spl; public function __construct() { $this->spl = new SplPriorityQueue(); $this->spl->insert($this, 1); } } $i = 0; while($i < 500) { $test = new test(); unset($test); gc_collect_cycles(); echo number_format(memory_get_usage()) . " B \n"; $i++; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 4
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 4
Branch analysis from position: 20
Branch analysis from position: 4
filename:       /in/4UJ3p
function name:  (null)
number of ops:  21
compiled vars:  !0 = $i, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'gc_enable'
          1        DO_ICALL                                                 
   16     2        ASSIGN                                                   !0, 0
   17     3      > JMP                                                      ->18
   18     4    >   NEW                                              $4      'test'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $4
   20     7        UNSET_CV                                                 !1
   21     8        INIT_FCALL                                               'gc_collect_cycles'
          9        DO_ICALL                                                 
   23    10        INIT_FCALL                                               'number_format'
         11        INIT_FCALL                                               'memory_get_usage'
         12        DO_ICALL                                         $8      
         13        SEND_VAR                                                 $8
         14        DO_ICALL                                         $9      
         15        CONCAT                                           ~10     $9, '+B+%0A'
         16        ECHO                                                     ~10
   24    17        PRE_INC                                                  !0
   17    18    >   IS_SMALLER                                               !0, 500
         19      > JMPNZ                                                    ~12, ->4
   25    20    > > RETURN                                                   1

Class test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4UJ3p
function name:  __construct
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'SplPriorityQueue'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'spl'
          3        OP_DATA                                                  $1
   12     4        FETCH_OBJ_R                                      ~3      'spl'
          5        INIT_METHOD_CALL                                         ~3, 'insert'
          6        FETCH_THIS                                       $4      
          7        SEND_VAR_EX                                              $4
          8        SEND_VAL_EX                                              1
          9        DO_FCALL                                      0          
   13    10      > RETURN                                                   null

End of function __construct

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.42 ms | 1396 KiB | 21 Q