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 sprintf('%1$04d: ', $i) . number_format(memory_get_usage()) . " B <br>"; $i++; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 4
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 4
Branch analysis from position: 25
Branch analysis from position: 4
filename:       /in/onVfF
function name:  (null)
number of ops:  26
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                                                      ->23
   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                                               'sprintf'
         11        SEND_VAL                                                 '%251%2404d%3A+'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $8      
         14        INIT_FCALL                                               'number_format'
         15        INIT_FCALL                                               'memory_get_usage'
         16        DO_ICALL                                         $9      
         17        SEND_VAR                                                 $9
         18        DO_ICALL                                         $10     
         19        CONCAT                                           ~11     $8, $10
         20        CONCAT                                           ~12     ~11, '+B+%3Cbr%3E'
         21        ECHO                                                     ~12
   24    22        PRE_INC                                                  !0
   17    23    >   IS_SMALLER                                               !0, 500
         24      > JMPNZ                                                    ~14, ->4
   25    25    > > RETURN                                                   1

Class test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/onVfF
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:
149.09 ms | 1392 KiB | 23 Q