3v4l.org

run code in 300+ PHP versions simultaneously
<?php $samp = "This is an . examp-le0 9999' tex't using & my '- ' - / Regex expression"; $samp = preg_replace('/[^A-Z0-9 ]+[^A-Z0-9\'-]/i', " ", $samp); $samp = str_replace(" "," ",$samp); $jk = explode(" ",$samp); $i = sizeof($jk); $j = 0; $array=""; for($j=0;$j<$i-2;$j++) { $array[] = $jk[$j]." ".$jk[$j+1]." ".$jk[$j+2]; } print_r($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 24
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 24
Branch analysis from position: 39
Branch analysis from position: 24
filename:       /in/f0dAV
function name:  (null)
number of ops:  43
compiled vars:  !0 = $samp, !1 = $jk, !2 = $i, !3 = $j, !4 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'This+is+an+.+examp-le0+9999%27+tex%27t+using+%26+my+%27-+%27+-+%2F+Regex+expression'
    3     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5B%5EA-Z0-9+%5D%2B%5B%5EA-Z0-9%27-%5D%2Fi'
          3        SEND_VAL                                                 '+'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !0, $6
    4     7        INIT_FCALL                                               'str_replace'
          8        SEND_VAL                                                 '+++'
          9        SEND_VAL                                                 '+'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !0, $8
    5    13        INIT_FCALL                                               'explode'
         14        SEND_VAL                                                 '+'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $10     
         17        ASSIGN                                                   !1, $10
    6    18        COUNT                                            ~12     !1
         19        ASSIGN                                                   !2, ~12
    7    20        ASSIGN                                                   !3, 0
    9    21        ASSIGN                                                   !4, ''
   10    22        ASSIGN                                                   !3, 0
         23      > JMP                                                      ->36
   12    24    >   FETCH_DIM_R                                      ~18     !1, !3
         25        CONCAT                                           ~19     ~18, '+'
         26        ADD                                              ~20     !3, 1
         27        FETCH_DIM_R                                      ~21     !1, ~20
         28        CONCAT                                           ~22     ~19, ~21
         29        CONCAT                                           ~23     ~22, '+'
         30        ADD                                              ~24     !3, 2
         31        FETCH_DIM_R                                      ~25     !1, ~24
         32        CONCAT                                           ~26     ~23, ~25
         33        ASSIGN_DIM                                               !4
         34        OP_DATA                                                  ~26
   10    35        PRE_INC                                                  !3
         36    >   SUB                                              ~28     !2, 2
         37        IS_SMALLER                                               !3, ~28
         38      > JMPNZ                                                    ~29, ->24
   15    39    >   INIT_FCALL                                               'print_r'
         40        SEND_VAR                                                 !4
         41        DO_ICALL                                                 
         42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.16 ms | 1392 KiB | 21 Q