3v4l.org

run code in 300+ PHP versions simultaneously
<?php gc_enable(); class test { public $spl; public function __construct() { $this->spl = 5; } } $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/esUHj
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                                                 
   15     2        ASSIGN                                                   !0, 0
   16     3      > JMP                                                      ->18
   17     4    >   NEW                                              $4      'test'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $4
   19     7        UNSET_CV                                                 !1
   20     8        INIT_FCALL                                               'gc_collect_cycles'
          9        DO_ICALL                                                 
   22    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
   23    17        PRE_INC                                                  !0
   16    18    >   IS_SMALLER                                               !0, 500
         19      > JMPNZ                                                    ~12, ->4
   24    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/esUHj
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN_OBJ                                               'spl'
          1        OP_DATA                                                  5
   12     2      > RETURN                                                   null

End of function __construct

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.62 ms | 1396 KiB | 21 Q