3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "This is my test case for an example."; $result = []; $last = null; foreach (explode(' ', $string) as $word) { if ($last) { $result[] = "$last $word"; } $last = $word; } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 17
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 17
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 15
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/unA6d
function name:  (null)
number of ops:  22
compiled vars:  !0 = $string, !1 = $result, !2 = $last, !3 = $word
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'This+is+my+test+case+for+an+example.'
    5     1        ASSIGN                                                   !1, <array>
    6     2        ASSIGN                                                   !2, null
    7     3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '+'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $7      
          7      > FE_RESET_R                                       $8      $7, ->17
          8    > > FE_FETCH_R                                               $8, !3, ->17
    8     9    > > JMPZ                                                     !2, ->15
    9    10    >   ROPE_INIT                                     3  ~11     !2
         11        ROPE_ADD                                      1  ~11     ~11, '+'
         12        ROPE_END                                      2  ~10     ~11, !3
         13        ASSIGN_DIM                                               !1
         14        OP_DATA                                                  ~10
   11    15    >   ASSIGN                                                   !2, !3
    7    16      > JMP                                                      ->8
         17    >   FE_FREE                                                  $8
   13    18        INIT_FCALL                                               'var_export'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.94 ms | 1001 KiB | 15 Q