3v4l.org

run code in 300+ 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 = 19
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/kmMRk
function name:  (null)
number of ops:  21
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, ->19
          2    > > FE_FETCH_R                                               $4, !1, ->19
    8     3    >   INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '+'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !2, $5
    9     8        INIT_FCALL                                               'implode'
          9        SEND_VAL                                                 '+'
         10        FETCH_DIM_R                                      ~7      !2, 0
         11        INIT_ARRAY                                       ~8      ~7
         12        FETCH_DIM_R                                      ~9      !2, 1
         13        ADD_ARRAY_ELEMENT                                ~8      ~9
         14        SEND_VAL                                                 ~8
         15        DO_ICALL                                         $10     
         16        CONCAT                                           ~11     $10, '%0A'
         17        ECHO                                                     ~11
    7    18      > JMP                                                      ->2
         19    >   FE_FREE                                                  $4
   10    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.32 ms | 1000 KiB | 15 Q