3v4l.org

run code in 300+ PHP versions simultaneously
<?php $baseMemory = memory_get_usage(); $array = array(); function test() { global $array; $array['test'] = 4; } echo sprintf( '%8d: ', $i ), memory_get_usage() - $baseMemory, "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YZm1K
function name:  (null)
number of ops:  15
compiled vars:  !0 = $baseMemory, !1 = $array, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'memory_get_usage'
          1        DO_ICALL                                         $3      
          2        ASSIGN                                                   !0, $3
    3     3        ASSIGN                                                   !1, <array>
   11     4        INIT_FCALL                                               'sprintf'
          5        SEND_VAL                                                 '%258d%3A+'
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $6      
          8        ECHO                                                     $6
          9        INIT_FCALL                                               'memory_get_usage'
         10        DO_ICALL                                         $7      
         11        SUB                                              ~8      $7, !0
         12        ECHO                                                     ~8
         13        ECHO                                                     '%0A'
         14      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YZm1K
function name:  test
number of ops:  4
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   BIND_GLOBAL                                              !0, 'array'
    8     1        ASSIGN_DIM                                               !0, 'test'
          2        OP_DATA                                                  4
    9     3      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.27 ms | 1395 KiB | 17 Q