3v4l.org

run code in 300+ PHP versions simultaneously
<?php $addr = "http://10.0.0.4/?utm_source=source1&utm_medium=medium1&utm_campaign=campaign1"; // Parse the url. $tableName = array ('referer_medium', 'referer_source', 'referer_campaign'); $tags = array ('utm_medium=', 'utm_source=', 'utm_campaign='); $results = explode("&", explode("?", $addr)[1]); print_r($results); foreach($results as $result){ foreach($tags as $tag) { if (($offset = stripos($result, $tag)) !== false) { echo "Tag: {$tag}, Result: {$result}\n"; echo $offset = stripos($result, $tag)."\n"; $gonzag[] = substr($result, $offset); } } } print_r($gonzag); //foreach ($tags as $key => $tag){ // $visitorInfo["{$tableName[$key]}"] = $_GET["{$tag}"]; //}
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 49
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 49
Branch analysis from position: 18
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 47
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 47
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 46
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 46
Branch analysis from position: 47
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 47
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 49
filename:       /in/TJAL9
function name:  (null)
number of ops:  54
compiled vars:  !0 = $addr, !1 = $tableName, !2 = $tags, !3 = $results, !4 = $result, !5 = $tag, !6 = $offset, !7 = $gonzag
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2F10.0.0.4%2F%3Futm_source%3Dsource1%26utm_medium%3Dmedium1%26utm_campaign%3Dcampaign1'
    5     1        ASSIGN                                                   !1, <array>
    6     2        ASSIGN                                                   !2, <array>
    8     3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '%26'
          5        INIT_FCALL                                               'explode'
          6        SEND_VAL                                                 '%3F'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $11     
          9        FETCH_DIM_R                                      ~12     $11, 1
         10        SEND_VAL                                                 ~12
         11        DO_ICALL                                         $13     
         12        ASSIGN                                                   !3, $13
   10    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                                 
   12    16      > FE_RESET_R                                       $16     !3, ->49
         17    > > FE_FETCH_R                                               $16, !4, ->49
   13    18    > > FE_RESET_R                                       $17     !2, ->47
         19    > > FE_FETCH_R                                               $17, !5, ->47
   14    20    >   INIT_FCALL                                               'stripos'
         21        SEND_VAR                                                 !4
         22        SEND_VAR                                                 !5
         23        DO_ICALL                                         $18     
         24        ASSIGN                                           ~19     !6, $18
         25        TYPE_CHECK                                  1018          ~19
         26      > JMPZ                                                     ~20, ->46
   16    27    >   ROPE_INIT                                     5  ~22     'Tag%3A+'
         28        ROPE_ADD                                      1  ~22     ~22, !5
         29        ROPE_ADD                                      2  ~22     ~22, '%2C+Result%3A+'
         30        ROPE_ADD                                      3  ~22     ~22, !4
         31        ROPE_END                                      4  ~21     ~22, '%0A'
         32        ECHO                                                     ~21
   17    33        INIT_FCALL                                               'stripos'
         34        SEND_VAR                                                 !4
         35        SEND_VAR                                                 !5
         36        DO_ICALL                                         $25     
         37        CONCAT                                           ~26     $25, '%0A'
         38        ASSIGN                                           ~27     !6, ~26
         39        ECHO                                                     ~27
   18    40        INIT_FCALL                                               'substr'
         41        SEND_VAR                                                 !4
         42        SEND_VAR                                                 !6
         43        DO_ICALL                                         $29     
         44        ASSIGN_DIM                                               !7
         45        OP_DATA                                                  $29
   13    46    > > JMP                                                      ->19
         47    >   FE_FREE                                                  $17
   12    48      > JMP                                                      ->17
         49    >   FE_FREE                                                  $16
   23    50        INIT_FCALL                                               'print_r'
         51        SEND_VAR                                                 !7
         52        DO_ICALL                                                 
   27    53      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.3 ms | 1400 KiB | 21 Q