3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(); $a[1] = 'toto'; echo memory_get_usage() . '\n'; $a[2] = 'titi'; echo memory_get_usage() . '\n'; $a[1000000] = 'tata'; echo memory_get_usage() . '\n';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qT1ee
function name:  (null)
number of ops:  20
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN_DIM                                               !0, 1
          2        OP_DATA                                                  'toto'
    4     3        INIT_FCALL                                               'memory_get_usage'
          4        DO_ICALL                                         $3      
          5        CONCAT                                           ~4      $3, '%5Cn'
          6        ECHO                                                     ~4
    5     7        ASSIGN_DIM                                               !0, 2
          8        OP_DATA                                                  'titi'
    6     9        INIT_FCALL                                               'memory_get_usage'
         10        DO_ICALL                                         $6      
         11        CONCAT                                           ~7      $6, '%5Cn'
         12        ECHO                                                     ~7
    7    13        ASSIGN_DIM                                               !0, 1000000
         14        OP_DATA                                                  'tata'
    8    15        INIT_FCALL                                               'memory_get_usage'
         16        DO_ICALL                                         $9      
         17        CONCAT                                           ~10     $9, '%5Cn'
         18        ECHO                                                     ~10
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.86 ms | 1395 KiB | 15 Q