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) { return bar($var); } function bar($var) { return is_array($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/uoiiN
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'
   15    10        INIT_FCALL                                               'foo'
         11        SEND_REF                                                 !0
         12        DO_FCALL                                      0          
   17    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/uoiiN
function name:  foo
number of ops:  6
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        INIT_FCALL_BY_NAME                                       'bar'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
    9     5*     > RETURN                                                   null

End of function foo

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uoiiN
function name:  bar
number of ops:  4
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        TYPE_CHECK                                  128  ~1      !0
          2      > RETURN                                                   ~1
   13     3*     > RETURN                                                   null

End of function bar

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.98 ms | 1399 KiB | 18 Q