3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = '.'; $a = ''; for ($i=0;$i<1000000;$i++) $a = "$a$x"; unset($a,$x); echo memory_get_usage()."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 4
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 4
Branch analysis from position: 10
Branch analysis from position: 4
filename:       /in/2q3q0
function name:  (null)
number of ops:  17
compiled vars:  !0 = $x, !1 = $a, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '.'
    3     1        ASSIGN                                                   !1, ''
    4     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->8
    5     4    >   NOP                                                      
          5        FAST_CONCAT                                      ~6      !1, !0
          6        ASSIGN                                                   !1, ~6
    4     7        PRE_INC                                                  !2
          8    >   IS_SMALLER                                               !2, 1000000
          9      > JMPNZ                                                    ~9, ->4
    7    10    >   UNSET_CV                                                 !1
         11        UNSET_CV                                                 !0
    8    12        INIT_FCALL                                               'memory_get_usage'
         13        DO_ICALL                                         $10     
         14        CONCAT                                           ~11     $10, '%0A'
         15        ECHO                                                     ~11
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.96 ms | 1395 KiB | 15 Q