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

Class x:
Function __constuct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6tF3R
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:
149.95 ms | 1405 KiB | 19 Q