3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! // Проверяем если это контекст $referer = ''; $request = ''; $pid = 2; if(preg_match('/utm_medium=cpc', $referer) || preg_match('/utm_medium=cpc', $request)) { //$this->source = $this->source_ref['context']; echo 1; } // Проверяем на партнеров if(isset($pid) && !empty(trim($pid))) { //$this->source = $this->source_ref['partner']; echo 2; } // Проверяем на поисковики if(preg_match('/search', $referer)) { //$this->source = $this->source_ref['search']; echo 3; } // Проверяем на рассылки if(preg_match('/(id_notification=|unsubscribe=)', $request)) { //$this->source = $this->source_ref['mail']; echo 4; } if(empty($referer) && !isset($pid) || preg_match('/sravnikupi.ru/', $referer)) { //$this->source = $this->source_ref['direct']; echo 5; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
2 jumps found. (Code = 46) Position 1 = 17, Position 2 = 23
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 25
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 31
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 37
Branch analysis from position: 36
2 jumps found. (Code = 46) Position 1 = 39, Position 2 = 42
Branch analysis from position: 39
2 jumps found. (Code = 47) Position 1 = 43, Position 2 = 48
Branch analysis from position: 43
2 jumps found. (Code = 43) Position 1 = 49, Position 2 = 50
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 50
Branch analysis from position: 48
Branch analysis from position: 42
Branch analysis from position: 37
Branch analysis from position: 31
Branch analysis from position: 25
Branch analysis from position: 23
Branch analysis from position: 15
Branch analysis from position: 13
filename:       /in/ESdaN
function name:  (null)
number of ops:  51
compiled vars:  !0 = $referer, !1 = $request, !2 = $pid
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, ''
    5     1        ASSIGN                                                   !1, ''
    6     2        ASSIGN                                                   !2, 2
    7     3        INIT_FCALL                                               'preg_match'
          4        SEND_VAL                                                 '%2Futm_medium%3Dcpc'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $6      
          7      > JMPNZ_EX                                         ~7      $6, ->13
          8    >   INIT_FCALL                                               'preg_match'
          9        SEND_VAL                                                 '%2Futm_medium%3Dcpc'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $8      
         12        BOOL                                             ~7      $8
         13    > > JMPZ                                                     ~7, ->15
    9    14    >   ECHO                                                     1
   12    15    >   ISSET_ISEMPTY_CV                                 ~9      !2
         16      > JMPZ_EX                                          ~9      ~9, ->23
         17    >   INIT_FCALL                                               'trim'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                         $10     
         20        BOOL_NOT                                         ~11     $10
         21        BOOL_NOT                                         ~12     ~11
         22        BOOL                                             ~9      ~12
         23    > > JMPZ                                                     ~9, ->25
   14    24    >   ECHO                                                     2
   17    25    >   INIT_FCALL                                               'preg_match'
         26        SEND_VAL                                                 '%2Fsearch'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                         $13     
         29      > JMPZ                                                     $13, ->31
   19    30    >   ECHO                                                     3
   22    31    >   INIT_FCALL                                               'preg_match'
         32        SEND_VAL                                                 '%2F%28id_notification%3D%7Cunsubscribe%3D%29'
         33        SEND_VAR                                                 !1
         34        DO_ICALL                                         $14     
         35      > JMPZ                                                     $14, ->37
   24    36    >   ECHO                                                     4
   26    37    >   ISSET_ISEMPTY_CV                                 ~15     !0
         38      > JMPZ_EX                                          ~15     ~15, ->42
         39    >   ISSET_ISEMPTY_CV                                 ~16     !2
         40        BOOL_NOT                                         ~17     ~16
         41        BOOL                                             ~15     ~17
         42    > > JMPNZ_EX                                         ~15     ~15, ->48
         43    >   INIT_FCALL                                               'preg_match'
         44        SEND_VAL                                                 '%2Fsravnikupi.ru%2F'
         45        SEND_VAR                                                 !0
         46        DO_ICALL                                         $18     
         47        BOOL                                             ~15     $18
         48    > > JMPZ                                                     ~15, ->50
   28    49    >   ECHO                                                     5
   29    50    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.94 ms | 1400 KiB | 17 Q