3v4l.org

run code in 300+ PHP versions simultaneously
<?php $addr = "http://10.0.0.4/?gonzago=jemangedesfleurs&utm_source=source1&utm_medium=medium1&pk_lol=123&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"; $gonzag[] = substr($result, strlen($tag)); } } } 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 = 43
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 43
Branch analysis from position: 18
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 41
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 41
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 40
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 40
Branch analysis from position: 41
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 41
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
filename:       /in/jHCbo
function name:  (null)
number of ops:  48
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%3Fgonzago%3Djemangedesfleurs%26utm_source%3Dsource1%26utm_medium%3Dmedium1%26pk_lol%3D123%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, ->43
         17    > > FE_FETCH_R                                               $16, !4, ->43
   13    18    > > FE_RESET_R                                       $17     !2, ->41
         19    > > FE_FETCH_R                                               $17, !5, ->41
   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, ->40
   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                                               'substr'
         34        SEND_VAR                                                 !4
         35        STRLEN                                           ~26     !5
         36        SEND_VAL                                                 ~26
         37        DO_ICALL                                         $27     
         38        ASSIGN_DIM                                               !7
         39        OP_DATA                                                  $27
   13    40    > > JMP                                                      ->19
         41    >   FE_FREE                                                  $17
   12    42      > JMP                                                      ->17
         43    >   FE_FREE                                                  $16
   22    44        INIT_FCALL                                               'print_r'
         45        SEND_VAR                                                 !7
         46        DO_ICALL                                                 
   26    47      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.34 ms | 1392 KiB | 21 Q