3v4l.org

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.43 ms | 1387 KiB | 17 Q