3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "This is my test case for an example."; $words = explode(' ', $string); $result = []; for ($i = 1, $max = count($words); $i < $max; ++$i) { $result[] = $words[$i - 1] . ' ' . $words[$i]; } var_export($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 11
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 11
Branch analysis from position: 21
Branch analysis from position: 11
filename:       /in/R0Jg0
function name:  (null)
number of ops:  25
compiled vars:  !0 = $string, !1 = $words, !2 = $result, !3 = $i, !4 = $max
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'This+is+my+test+case+for+an+example.'
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    6     6        ASSIGN                                                   !2, <array>
    7     7        ASSIGN                                                   !3, 1
          8        COUNT                                            ~10     !1
          9        ASSIGN                                                   !4, ~10
         10      > JMP                                                      ->19
    8    11    >   SUB                                              ~13     !3, 1
         12        FETCH_DIM_R                                      ~14     !1, ~13
         13        CONCAT                                           ~15     ~14, '+'
         14        FETCH_DIM_R                                      ~16     !1, !3
         15        CONCAT                                           ~17     ~15, ~16
         16        ASSIGN_DIM                                               !2
         17        OP_DATA                                                  ~17
    7    18        PRE_INC                                                  !3
         19    >   IS_SMALLER                                               !3, !4
         20      > JMPNZ                                                    ~19, ->11
   10    21    >   INIT_FCALL                                               'var_export'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.62 ms | 1001 KiB | 15 Q