3v4l.org

run code in 500+ 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 = 19, Position 2 = 7
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/K789X
function name:  (null)
number of ops:  20
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                                                   'array_slice'
          8        SEND_VAR                                                     !1
          9        SEND_VAR                                                     !2
         10        SEND_VAL                                                     3
         11        DO_ICALL                                             $7      
         12        FRAMELESS_ICALL_2                implode             ~8      '+', $7
         13        CONCAT                                               ~9      ~8, '%0A'
         14        ECHO                                                         ~9
    9    15        PRE_INC                                                      !2
   10    16        ADD                                                  ~11     !2, 2
         17        ISSET_ISEMPTY_DIM_OBJ                             0          !1, ~11
         18      > JMPNZ                                                        ~12, ->7
         19    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.33 ms | 2008 KiB | 15 Q