3v4l.org

run code in 300+ PHP versions simultaneously
<?php $example = 'This is an example of what I need.'; $words = str_word_count($example, 1); $x = 0; do { echo implode(' ', array_slice($words, $x, 3)) . "\n"; ++$x; } while (isset($words[$x + 2]));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 7
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/K789X
function name:  (null)
number of ops:  23
compiled vars:  !0 = $example, !1 = $words, !2 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'This+is+an+example+of+what+I+need.'
    5     1        INIT_FCALL                                               'str_word_count'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 1
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    6     6        ASSIGN                                                   !2, 0
    8     7    >   INIT_FCALL                                               'implode'
          8        SEND_VAL                                                 '+'
          9        INIT_FCALL                                               'array_slice'
         10        SEND_VAR                                                 !1
         11        SEND_VAR                                                 !2
         12        SEND_VAL                                                 3
         13        DO_ICALL                                         $7      
         14        SEND_VAR                                                 $7
         15        DO_ICALL                                         $8      
         16        CONCAT                                           ~9      $8, '%0A'
         17        ECHO                                                     ~9
    9    18        PRE_INC                                                  !2
   10    19        ADD                                              ~11     !2, 2
         20        ISSET_ISEMPTY_DIM_OBJ                         0          !1, ~11
         21      > JMPNZ                                                    ~12, ->7
         22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.8 ms | 1003 KiB | 16 Q