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 < 50000) { $time = microtime(1); $test = new test(); unset($test); gc_collect_cycles(); echo sprintf('%1$04d: ', $i) . number_format(memory_get_usage()) . " B\n"; $i++; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 4
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 4
Branch analysis from position: 29
Branch analysis from position: 4
filename:       /in/ccPnn
function name:  (null)
number of ops:  30
compiled vars:  !0 = $i, !1 = $time, !2 = $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                                                      ->27
   18     4    >   INIT_FCALL                                               'microtime'
          5        SEND_VAL                                                 1
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
   20     8        NEW                                              $7      'test'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $7
   22    11        UNSET_CV                                                 !2
   23    12        INIT_FCALL                                               'gc_collect_cycles'
         13        DO_ICALL                                                 
   25    14        INIT_FCALL                                               'sprintf'
         15        SEND_VAL                                                 '%251%2404d%3A+'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $11     
         18        INIT_FCALL                                               'number_format'
         19        INIT_FCALL                                               'memory_get_usage'
         20        DO_ICALL                                         $12     
         21        SEND_VAR                                                 $12
         22        DO_ICALL                                         $13     
         23        CONCAT                                           ~14     $11, $13
         24        CONCAT                                           ~15     ~14, '+B%0A'
         25        ECHO                                                     ~15
   26    26        PRE_INC                                                  !0
   17    27    >   IS_SMALLER                                               !0, 50000
         28      > JMPNZ                                                    ~17, ->4
   27    29    > > RETURN                                                   1

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