3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo extends ArrayObject {} echo memory_get_usage(), "\n"; for ($i = 0; $i < 1000; $i++ ) { $obj = new Foo(); $obj['foo'] = 'bar'; unset($obj); if ($i % 10) { echo memory_get_usage(), "\n"; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 6
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 6
Branch analysis from position: 21
Branch analysis from position: 6
Branch analysis from position: 18
filename:       /in/1H3nL
function name:  (null)
number of ops:  22
compiled vars:  !0 = $i, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'memory_get_usage'
          1        DO_ICALL                                         $2      
          2        ECHO                                                     $2
          3        ECHO                                                     '%0A'
    6     4        ASSIGN                                                   !0, 0
          5      > JMP                                                      ->19
    7     6    >   NEW                                              $4      'Foo'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $4
    8     9        ASSIGN_DIM                                               !1, 'foo'
         10        OP_DATA                                                  'bar'
    9    11        UNSET_CV                                                 !1
   10    12        MOD                                              ~8      !0, 10
         13      > JMPZ                                                     ~8, ->18
   11    14    >   INIT_FCALL                                               'memory_get_usage'
         15        DO_ICALL                                         $9      
         16        ECHO                                                     $9
         17        ECHO                                                     '%0A'
    6    18    >   PRE_INC                                                  !0
         19    >   IS_SMALLER                                               !0, 1000
         20      > JMPNZ                                                    ~11, ->6
   13    21    > > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.69 ms | 1395 KiB | 15 Q