3v4l.org

run code in 500+ PHP versions simultaneously
<?php $strings = [ "First example from this part 10 t/m 16 it has to be removed", "Second example from this part 12 t/m 22 it has to be removed" ]; foreach ($strings as $string) { $parts = explode(" ", $string); echo implode(" ", [$parts[0], $parts[1]]) . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 16
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/kmMRk
function name:  (null)
number of ops:  18
compiled vars:  !0 = $strings, !1 = $string, !2 = $parts
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    7     1      > FE_RESET_R                                           $4      !0, ->16
          2    > > FE_FETCH_R                                                   $4, !1, ->16
    8     3    >   INIT_FCALL                                                   'explode'
          4        SEND_VAL                                                     '+'
          5        SEND_VAR                                                     !1
          6        DO_ICALL                                             $5      
          7        ASSIGN                                                       !2, $5
    9     8        FETCH_DIM_R                                          ~7      !2, 0
          9        INIT_ARRAY                                           ~8      ~7
         10        FETCH_DIM_R                                          ~9      !2, 1
         11        ADD_ARRAY_ELEMENT                                    ~8      ~9
         12        FRAMELESS_ICALL_2                implode             ~10     '+', ~8
         13        CONCAT                                               ~11     ~10, '%0A'
         14        ECHO                                                         ~11
    7    15      > JMP                                                          ->2
         16    >   FE_FREE                                                      $4
   10    17      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.05 ms | 2015 KiB | 14 Q