3v4l.org

run code in 300+ PHP versions simultaneously
<?php $variable = range(1, 1000); echo memory_get_peak_usage(true), PHP_EOL; function foo($var) {} foo($variable); echo memory_get_peak_usage(true);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sPtHX
function name:  (null)
number of ops:  18
compiled vars:  !0 = $variable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 1000
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    5     5        INIT_FCALL                                               'memory_get_peak_usage'
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $3      
          8        ECHO                                                     $3
          9        ECHO                                                     '%0A'
    9    10        INIT_FCALL                                               'foo'
         11        SEND_VAR                                                 !0
         12        DO_FCALL                                      0          
   11    13        INIT_FCALL                                               'memory_get_peak_usage'
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $5      
         16        ECHO                                                     $5
         17      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sPtHX
function name:  foo
number of ops:  2
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.51 ms | 1397 KiB | 18 Q