3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = "[Code][WST-2587] hello world"; print($value); print("\n"); $trimPattern = '/^[”’"\'(<]*@?(.+?)[.”’"\'\,!?:;)>]*$/'; print($trimPattern); print("\n"); $projects = array('IC', 'WST'); $calloutPattern = "/^(?:" . implode('|', $projects) . ")-[0-9]+$/"; print($calloutPattern); print("\n"); $words = preg_split('/(\s+)/', $value); foreach ($words as $word) { print($word); print("\n"); } preg_match_all('/[(<\[]((' . implode('|', $projects) . ')-[0-9]+)[\]>)]/', $value, $matches); $words = array_merge($words, $matches[1]); foreach ($words as $word) { print($word); print("\n"); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 26
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 26
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 26
2 jumps found. (Code = 77) Position 1 = 45, Position 2 = 49
Branch analysis from position: 45
2 jumps found. (Code = 78) Position 1 = 46, Position 2 = 49
Branch analysis from position: 46
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 49
Branch analysis from position: 26
filename:       /in/8gtMY
function name:  (null)
number of ops:  51
compiled vars:  !0 = $value, !1 = $trimPattern, !2 = $projects, !3 = $calloutPattern, !4 = $words, !5 = $word, !6 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5BCode%5D%5BWST-2587%5D+hello+world'
    4     1        ECHO                                                     !0
    5     2        ECHO                                                     '%0A'
    6     3        ASSIGN                                                   !1, '%2F%5E%5B%E2%80%9D%E2%80%99%22%27%28%3C%5D%2A%40%3F%28.%2B%3F%29%5B.%E2%80%9D%E2%80%99%22%27%5C%2C%21%3F%3A%3B%29%3E%5D%2A%24%2F'
    7     4        ECHO                                                     !1
    8     5        ECHO                                                     '%0A'
    9     6        ASSIGN                                                   !2, <array>
   10     7        INIT_FCALL                                               'implode'
          8        SEND_VAL                                                 '%7C'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $10     
         11        CONCAT                                           ~11     '%2F%5E%28%3F%3A', $10
         12        CONCAT                                           ~12     ~11, '%29-%5B0-9%5D%2B%24%2F'
         13        ASSIGN                                                   !3, ~12
   11    14        ECHO                                                     !3
   12    15        ECHO                                                     '%0A'
   13    16        INIT_FCALL                                               'preg_split'
         17        SEND_VAL                                                 '%2F%28%5Cs%2B%29%2F'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $14     
         20        ASSIGN                                                   !4, $14
   14    21      > FE_RESET_R                                       $16     !4, ->26
         22    > > FE_FETCH_R                                               $16, !5, ->26
   15    23    >   ECHO                                                     !5
   16    24        ECHO                                                     '%0A'
   14    25      > JMP                                                      ->22
         26    >   FE_FREE                                                  $16
   19    27        INIT_FCALL                                               'preg_match_all'
         28        INIT_FCALL                                               'implode'
         29        SEND_VAL                                                 '%7C'
         30        SEND_VAR                                                 !2
         31        DO_ICALL                                         $17     
         32        CONCAT                                           ~18     '%2F%5B%28%3C%5C%5B%5D%28%28', $17
         33        CONCAT                                           ~19     ~18, '%29-%5B0-9%5D%2B%29%5B%5C%5D%3E%29%5D%2F'
         34        SEND_VAL                                                 ~19
         35        SEND_VAR                                                 !0
         36        SEND_REF                                                 !6
         37        DO_ICALL                                                 
   20    38        INIT_FCALL                                               'array_merge'
         39        SEND_VAR                                                 !4
         40        FETCH_DIM_R                                      ~21     !6, 1
         41        SEND_VAL                                                 ~21
         42        DO_ICALL                                         $22     
         43        ASSIGN                                                   !4, $22
   22    44      > FE_RESET_R                                       $24     !4, ->49
         45    > > FE_FETCH_R                                               $24, !5, ->49
   23    46    >   ECHO                                                     !5
   24    47        ECHO                                                     '%0A'
   22    48      > JMP                                                      ->45
         49    >   FE_FREE                                                  $24
   25    50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.15 ms | 1400 KiB | 21 Q