3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = "# 12 # # # Hello World"; $arr = explode(" ", $str); $newarr = array_slice($arr, 0,5); $new = implode(" ", $newarr); Echo $new;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E9XUG
function name:  (null)
number of ops:  16
compiled vars:  !0 = $str, !1 = $arr, !2 = $newarr, !3 = $new
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%23+12+%23+%23+%23+Hello+World'
    5     1        INIT_FCALL                                                   'explode'
          2        SEND_VAL                                                     '+'
          3        SEND_VAR                                                     !0
          4        DO_ICALL                                             $5      
          5        ASSIGN                                                       !1, $5
    7     6        INIT_FCALL                                                   'array_slice'
          7        SEND_VAR                                                     !1
          8        SEND_VAL                                                     0
          9        SEND_VAL                                                     5
         10        DO_ICALL                                             $7      
         11        ASSIGN                                                       !2, $7
    9    12        FRAMELESS_ICALL_2                implode             ~9      '+', !2
         13        ASSIGN                                                       !3, ~9
   10    14        ECHO                                                         !3
         15      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.73 ms | 2539 KiB | 15 Q