3v4l.org

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

Class test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KmGDj
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.5.0


preferences:
153.62 ms | 1808 KiB | 14 Q