3v4l.org

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

Class x:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0uouo
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:
156.11 ms | 1400 KiB | 21 Q