3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function abc($a) { unset($a[1]); } $a = range(1, 5000); echo memory_get_peak_usage(true), "\n"; abc($a); echo memory_get_peak_usage(true), "\n";
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Lsnm7
function name:  (null)
number of ops:  20
compiled vars:  !0 = $a
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
   8     1        INIT_FCALL                                               'range'
         2        SEND_VAL                                                 1
         3        SEND_VAL                                                 5000
         4        DO_ICALL                                         $1      
         5        ASSIGN                                                   !0, $1
  10     6        INIT_FCALL                                               'memory_get_peak_usage'
         7        SEND_VAL                                                 <true>
         8        DO_ICALL                                         $3      
         9        ECHO                                                     $3
        10        ECHO                                                     '%0A'
  11    11        INIT_FCALL                                               'abc'
        12        SEND_VAR                                                 !0
        13        DO_FCALL                                      0          
  12    14        INIT_FCALL                                               'memory_get_peak_usage'
        15        SEND_VAL                                                 <true>
        16        DO_ICALL                                         $5      
        17        ECHO                                                     $5
        18        ECHO                                                     '%0A'
        19      > RETURN                                                   1

Function abc:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Lsnm7
function name:  abc
number of ops:  3
compiled vars:  !0 = $a
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   RECV                                             !0      
   5     1        UNSET_DIM                                                !0, 1
   6     2      > RETURN                                                   null

End of function abc

Generated using Vulcan Logic Dumper, using php 7.2.0