3v4l.org

run code in 300+ PHP versions simultaneously
<?php function myfunction($array){ echo PHP_EOL . 'pass $array to function...' . PHP_EOL; var_dump(memory_get_usage()); echo PHP_EOL . 'modify $array...' . PHP_EOL; $array[343] = 23; var_dump(memory_get_usage()); } echo PHP_EOL . 'init $array with 10k elements...' . PHP_EOL; $array = range(1,10000); var_dump(memory_get_usage()); myfunction($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LKVPm
function name:  (null)
number of ops:  15
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                     '%0Ainit+%24array+with+10k+elements...%0A'
   12     1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 10000
          4        DO_ICALL                                         $1      
          5        ASSIGN                                                   !0, $1
   13     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'memory_get_usage'
          8        DO_ICALL                                         $3      
          9        SEND_VAR                                                 $3
         10        DO_ICALL                                                 
   14    11        INIT_FCALL                                               'myfunction'
         12        SEND_VAR                                                 !0
         13        DO_FCALL                                      0          
         14      > RETURN                                                   1

Function myfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LKVPm
function name:  myfunction
number of ops:  16
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ECHO                                                     '%0Apass+%24array+to+function...%0A'
    4     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'memory_get_usage'
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                                 
    6     7        ECHO                                                     '%0Amodify+%24array...%0A'
    7     8        ASSIGN_DIM                                               !0, 343
          9        OP_DATA                                                  23
    8    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'memory_get_usage'
         12        DO_ICALL                                         $4      
         13        SEND_VAR                                                 $4
         14        DO_ICALL                                                 
    9    15      > RETURN                                                   null

End of function myfunction

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.7 ms | 1390 KiB | 20 Q