3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = range(0, 10); 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/os0LT
function name:  (null)
number of ops:  37
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        INIT_FCALL                                               'array_slice'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 4
          9        DO_ICALL                                         $3      
         10        SEND_VAR                                                 $3
         11        DO_ICALL                                                 
    4    12        INIT_FCALL                                               'print_r'
         13        INIT_FCALL                                               'array_slice'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 4
         16        SEND_VAL                                                 null
         17        DO_ICALL                                         $5      
         18        SEND_VAR                                                 $5
         19        DO_ICALL                                                 
    5    20        INIT_FCALL                                               'print_r'
         21        INIT_FCALL                                               'array_slice'
         22        SEND_VAR                                                 !0
         23        SEND_VAL                                                 4
         24        SEND_VAL                                                 <false>
         25        DO_ICALL                                         $7      
         26        SEND_VAR                                                 $7
         27        DO_ICALL                                                 
    6    28        INIT_FCALL                                               'print_r'
         29        INIT_FCALL                                               'array_slice'
         30        SEND_VAR                                                 !0
         31        SEND_VAL                                                 4
         32        SEND_VAL                                                 ''
         33        DO_ICALL                                         $9      
         34        SEND_VAR                                                 $9
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.12 ms | 1396 KiB | 19 Q