3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = range(0, 10); print_r($foo); print_r( array_slice($foo, 4) ); print_r( array_slice($foo, 4, NULL) ); print_r( array_slice($foo, 4, FALSE) ); print_r( array_slice($foo, 4, '') );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JdaH7
function name:  (null)
number of ops:  40
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 10
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    3     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    4     8        INIT_FCALL                                               'print_r'
          9        INIT_FCALL                                               'array_slice'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 4
         12        DO_ICALL                                         $4      
         13        SEND_VAR                                                 $4
         14        DO_ICALL                                                 
    5    15        INIT_FCALL                                               'print_r'
         16        INIT_FCALL                                               'array_slice'
         17        SEND_VAR                                                 !0
         18        SEND_VAL                                                 4
         19        SEND_VAL                                                 null
         20        DO_ICALL                                         $6      
         21        SEND_VAR                                                 $6
         22        DO_ICALL                                                 
    6    23        INIT_FCALL                                               'print_r'
         24        INIT_FCALL                                               'array_slice'
         25        SEND_VAR                                                 !0
         26        SEND_VAL                                                 4
         27        SEND_VAL                                                 <false>
         28        DO_ICALL                                         $8      
         29        SEND_VAR                                                 $8
         30        DO_ICALL                                                 
    7    31        INIT_FCALL                                               'print_r'
         32        INIT_FCALL                                               'array_slice'
         33        SEND_VAR                                                 !0
         34        SEND_VAL                                                 4
         35        SEND_VAL                                                 ''
         36        DO_ICALL                                         $10     
         37        SEND_VAR                                                 $10
         38        DO_ICALL                                                 
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.03 ms | 1396 KiB | 19 Q