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()); } $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/odH2O
function name:  (null)
number of ops:  14
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 10000
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
   12     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'memory_get_usage'
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                                 
   13    10        INIT_FCALL                                               'myfunction'
         11        SEND_VAR                                                 !0
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

Function myfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/odH2O
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                                                     '%0A+pass+%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                                                     '%0A+modify+%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:
197.35 ms | 1399 KiB | 20 Q