3v4l.org

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

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

End of function __construct

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.17 ms | 1400 KiB | 19 Q