3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = ['a','b','c','d','e']; echo implode(', ', array_slice($array, 0, -1)) . ' and ' . end($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Nchc1
function name:  (null)
number of ops:  14
compiled vars:  !0 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        INIT_FCALL                                                   'array_slice'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     0
          4        SEND_VAL                                                     -1
          5        DO_ICALL                                             $2      
          6        FRAMELESS_ICALL_2                implode             ~3      '%2C+', $2
          7        CONCAT                                               ~4      ~3, '+and+'
          8        INIT_FCALL                                                   'end'
          9        SEND_REF                                                     !0
         10        DO_ICALL                                             $5      
         11        CONCAT                                               ~6      ~4, $5
         12        ECHO                                                         ~6
         13      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.19 ms | 1994 KiB | 15 Q