3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.31 ms | 1396 KiB | 19 Q