3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x { public $value; public function __constuct($value) { $this->value = $value; } } $array = []; for($i = 0; $i < 50000; $i++) { $array[] = md5('hallo'); $array[] = md5('bla'); } $x = new x($array); echo number_format(memory_get_usage(), 0, ',', '.'); echo "\n"; echo number_format(memory_get_usage(true), 0, ',', '.'); echo "\n"; unset($value); unset($x); echo gc_collect_cycles(); echo "\n"; echo number_format(memory_get_usage(), 0, ',', '.'); echo "\n"; echo number_format(memory_get_usage(true), 0, ',', '.');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 3
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 3
Branch analysis from position: 16
Branch analysis from position: 3
filename:       /in/RWZQR
function name:  (null)
number of ops:  68
compiled vars:  !0 = $array, !1 = $i, !2 = $x, !3 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, <array>
   12     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->14
   13     3    >   INIT_FCALL                                               'md5'
          4        SEND_VAL                                                 'hallo'
          5        DO_ICALL                                         $7      
          6        ASSIGN_DIM                                               !0
          7        OP_DATA                                                  $7
   14     8        INIT_FCALL                                               'md5'
          9        SEND_VAL                                                 'bla'
         10        DO_ICALL                                         $9      
         11        ASSIGN_DIM                                               !0
         12        OP_DATA                                                  $9
   12    13        PRE_INC                                                  !1
         14    >   IS_SMALLER                                               !1, 50000
         15      > JMPNZ                                                    ~11, ->3
   16    16    >   NEW                                              $12     'x'
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0          
         19        ASSIGN                                                   !2, $12
   18    20        INIT_FCALL                                               'number_format'
         21        INIT_FCALL                                               'memory_get_usage'
         22        DO_ICALL                                         $15     
         23        SEND_VAR                                                 $15
         24        SEND_VAL                                                 0
         25        SEND_VAL                                                 '%2C'
         26        SEND_VAL                                                 '.'
         27        DO_ICALL                                         $16     
         28        ECHO                                                     $16
   19    29        ECHO                                                     '%0A'
   20    30        INIT_FCALL                                               'number_format'
         31        INIT_FCALL                                               'memory_get_usage'
         32        SEND_VAL                                                 <true>
         33        DO_ICALL                                         $17     
         34        SEND_VAR                                                 $17
         35        SEND_VAL                                                 0
         36        SEND_VAL                                                 '%2C'
         37        SEND_VAL                                                 '.'
         38        DO_ICALL                                         $18     
         39        ECHO                                                     $18
   21    40        ECHO                                                     '%0A'
   23    41        UNSET_CV                                                 !3
   24    42        UNSET_CV                                                 !2
   25    43        INIT_FCALL                                               'gc_collect_cycles'
         44        DO_ICALL                                         $19     
         45        ECHO                                                     $19
   26    46        ECHO                                                     '%0A'
   28    47        INIT_FCALL                                               'number_format'
         48        INIT_FCALL                                               'memory_get_usage'
         49        DO_ICALL                                         $20     
         50        SEND_VAR                                                 $20
         51        SEND_VAL                                                 0
         52        SEND_VAL                                                 '%2C'
         53        SEND_VAL                                                 '.'
         54        DO_ICALL                                         $21     
         55        ECHO                                                     $21
   29    56        ECHO                                                     '%0A'
   30    57        INIT_FCALL                                               'number_format'
         58        INIT_FCALL                                               'memory_get_usage'
         59        SEND_VAL                                                 <true>
         60        DO_ICALL                                         $22     
         61        SEND_VAR                                                 $22
         62        SEND_VAL                                                 0
         63        SEND_VAL                                                 '%2C'
         64        SEND_VAL                                                 '.'
         65        DO_ICALL                                         $23     
         66        ECHO                                                     $23
         67      > RETURN                                                   1

Class x:
Function __constuct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RWZQR
function name:  __constuct
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN_OBJ                                               'value'
          2        OP_DATA                                                  !0
    8     3      > RETURN                                                   null

End of function __constuct

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.74 ms | 1400 KiB | 21 Q