3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FOO { public $f; } class BAR { public $f; } for ($i = 0; $i < 100; $i++) { $a = new FOO(); $b = new BAR(); $a->f = $b; $b->f = $a; print "Memory usage: " . number_format(memory_get_usage(true)) . " bytes\n"; unset($a); unset($b); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 2
Branch analysis from position: 26
Branch analysis from position: 2
filename:       /in/a93oe
function name:  (null)
number of ops:  27
compiled vars:  !0 = $i, !1 = $a, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->24
   12     2    >   NEW                                              $4      'FOO'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
   13     5        NEW                                              $7      'BAR'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !2, $7
   14     8        ASSIGN_OBJ                                               !1, 'f'
          9        OP_DATA                                                  !2
   15    10        ASSIGN_OBJ                                               !2, 'f'
         11        OP_DATA                                                  !1
   16    12        INIT_FCALL                                               'number_format'
         13        INIT_FCALL                                               'memory_get_usage'
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $12     
         16        SEND_VAR                                                 $12
         17        DO_ICALL                                         $13     
         18        CONCAT                                           ~14     'Memory+usage%3A+', $13
         19        CONCAT                                           ~15     ~14, '+bytes%0A'
         20        ECHO                                                     ~15
   17    21        UNSET_CV                                                 !1
   18    22        UNSET_CV                                                 !2
   11    23        PRE_INC                                                  !0
         24    >   IS_SMALLER                                               !0, 100
         25      > JMPNZ                                                    ~17, ->2
   19    26    > > RETURN                                                   1

Class FOO: [no user functions]
Class BAR: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.37 ms | 1395 KiB | 17 Q