3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* WT-Pine-Blush-0-short-rentwithtryon-Alias */ $_itemSku = "WT-Pine-Blush-0-short-rentwithtryon-Alias"; preg_match('/([^-]+\-){6}([^-]+)$/', $_itemSku, $matches); $result = (isset($matches[2])) ? $matches[2] : false; if ($result) { preg_match('/([a-z][A-Z])/', $result, $alias); $arr = explode('', $alias); //TODO: need to insert a space between the two items in the alias array echo $alias; } else { echo "nope"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 26
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 26
Branch analysis from position: 14
Branch analysis from position: 26
filename:       /in/oU70d
function name:  (null)
number of ops:  28
compiled vars:  !0 = $_itemSku, !1 = $matches, !2 = $result, !3 = $alias, !4 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'WT-Pine-Blush-0-short-rentwithtryon-Alias'
    6     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%28%5B%5E-%5D%2B%5C-%29%7B6%7D%28%5B%5E-%5D%2B%29%24%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    7     6        ISSET_ISEMPTY_DIM_OBJ                         0          !1, 2
          7      > JMPZ                                                     ~7, ->11
          8    >   FETCH_DIM_R                                      ~8      !1, 2
          9        QM_ASSIGN                                        ~9      ~8
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~9      <false>
         12    >   ASSIGN                                                   !2, ~9
    8    13      > JMPZ                                                     !2, ->26
    9    14    >   INIT_FCALL                                               'preg_match'
         15        SEND_VAL                                                 '%2F%28%5Ba-z%5D%5BA-Z%5D%29%2F'
         16        SEND_VAR                                                 !2
         17        SEND_REF                                                 !3
         18        DO_ICALL                                                 
   10    19        INIT_FCALL                                               'explode'
         20        SEND_VAL                                                 ''
         21        SEND_VAR                                                 !3
         22        DO_ICALL                                         $12     
         23        ASSIGN                                                   !4, $12
   12    24        ECHO                                                     !3
         25      > JMP                                                      ->27
   14    26    >   ECHO                                                     'nope'
   15    27    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.28 ms | 1396 KiB | 17 Q