3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(); $a[1] = 'toto'; $m = memory_get_usage(); $a[2] = 'titi'; $a[1000000] = 'tata'; echo memory_get_usage() - $m;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/a14iV
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a, !1 = $m
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                                         $4      
          5        ASSIGN                                                   !1, $4
    5     6        ASSIGN_DIM                                               !0, 2
          7        OP_DATA                                                  'titi'
    6     8        ASSIGN_DIM                                               !0, 1000000
          9        OP_DATA                                                  'tata'
    7    10        INIT_FCALL                                               'memory_get_usage'
         11        DO_ICALL                                         $8      
         12        SUB                                              ~9      $8, !1
         13        ECHO                                                     ~9
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.04 ms | 1394 KiB | 15 Q