3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ip_in_range($ip, $range) { $array_range = array(); if(strpos($range, ",") !== false) { // Varias faixas de ip $return = true; $array_range = explode(",", $range); foreach ($array_range as $key => $rangeIP) { echo $rangeIP; if($rangeIP){ if($ip != $range){ $return = false; break; } else if (strpos($rangeIP, '/') !== false) { // $rangeIP is in IP/NETMASK format list($rangeIP, $netmask) = explode('/', $rangeIP, 2); if (strpos($netmask, '.') !== false) { // $netmask is a 255.255.0.0 format $netmask = str_replace('*', '0', $netmask); $netmask_dec = ip2long($netmask); $return = ( (ip2long($ip) & $netmask_dec) == (ip2long($rangeIP) & $netmask_dec) ); if(!$return) { break; } } else { // $netmask is a CIDR size block // fix the rangeIP argument $x = explode('.', $rangeIP); while(count($x)<4) $x[] = '0'; list($a,$b,$c,$d) = $x; $rangeIP = sprintf("%u.%u.%u.%u", empty($a)?'0':$a, empty($b)?'0':$b,empty($c)?'0':$c,empty($d)?'0':$d); $range_dec = ip2long($rangeIP); $ip_dec = ip2long($ip); # Strategy 1 - Create the netmask with 'netmask' 1s and then fill it to 32 with 0s #$netmask_dec = bindec(str_pad('', $netmask, '1') . str_pad('', 32-$netmask, '0')); # Strategy 2 - Use math to create it $wildcard_dec = pow(2, (32-$netmask)) - 1; $netmask_dec = ~ $wildcard_dec; $return = (($ip_dec & $netmask_dec) == ($range_dec & $netmask_dec)); if(!$return) { break; } } } else { // rangeIP might be 255.255.*.* or 1.2.3.0-1.2.3.255 if (strpos($rangeIP, '*') !== false) { // a.b.*.* format // Just convert to A-B format by setting * to 0 for A and 255 for B $lower = str_replace('*', '0', $rangeIP); $upper = str_replace('*', '255', $rangeIP); $rangeIP = "$lower-$upper"; } if (strpos($rangeIP, '-') !== false) { // A-B format list($lower, $upper) = explode('-', $rangeIP, 2); $lower_dec = (float)sprintf("%u",ip2long($lower)); $upper_dec = (float)sprintf("%u",ip2long($upper)); $ip_dec = (float)sprintf("%u",ip2long($ip)); $return = ( ($ip_dec>=$lower_dec) && ($ip_dec<=$upper_dec) ); if(!$return) { break; } } $return = false; break; } } } return $return; } else { // Uma faixas de ip if(!$range){ return true; } else if($ip == $range){ return true; } else if (strpos($range, '/') !== false) { // $range is in IP/NETMASK format list($range, $netmask) = explode('/', $range, 2); if (strpos($netmask, '.') !== false) { // $netmask is a 255.255.0.0 format $netmask = str_replace('*', '0', $netmask); $netmask_dec = ip2long($netmask); return ( (ip2long($ip) & $netmask_dec) == (ip2long($range) & $netmask_dec) ); } else { // $netmask is a CIDR size block // fix the range argument $x = explode('.', $range); while(count($x)<4) $x[] = '0'; list($a,$b,$c,$d) = $x; $range = sprintf("%u.%u.%u.%u", empty($a)?'0':$a, empty($b)?'0':$b,empty($c)?'0':$c,empty($d)?'0':$d); $range_dec = ip2long($range); $ip_dec = ip2long($ip); # Strategy 1 - Create the netmask with 'netmask' 1s and then fill it to 32 with 0s #$netmask_dec = bindec(str_pad('', $netmask, '1') . str_pad('', 32-$netmask, '0')); # Strategy 2 - Use math to create it $wildcard_dec = pow(2, (32-$netmask)) - 1; $netmask_dec = ~ $wildcard_dec; return (($ip_dec & $netmask_dec) == ($range_dec & $netmask_dec)); } } else { // range might be 255.255.*.* or 1.2.3.0-1.2.3.255 if (strpos($range, '*') !==false) { // a.b.*.* format // Just convert to A-B format by setting * to 0 for A and 255 for B $lower = str_replace('*', '0', $range); $upper = str_replace('*', '255', $range); $range = "$lower-$upper"; } if (strpos($range, '-')!==false) { // A-B format list($lower, $upper) = explode('-', $range, 2); $lower_dec = (float)sprintf("%u",ip2long($lower)); $upper_dec = (float)sprintf("%u",ip2long($upper)); $ip_dec = (float)sprintf("%u",ip2long($ip)); return ( ($ip_dec>=$lower_dec) && ($ip_dec<=$upper_dec) ); } return false; } } } echo "\n". (int) ip_in_range("127.0.0.1", "127.0.0.0,127.0.0.1");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XcZYI
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  135     0  E >   INIT_FCALL                                               'ip_in_range'
          1        SEND_VAL                                                 '127.0.0.1'
          2        SEND_VAL                                                 '127.0.0.0%2C127.0.0.1'
          3        DO_FCALL                                      0  $0      
          4        CAST                                          4  ~1      $0
          5        CONCAT                                           ~2      '%0A', ~1
          6        ECHO                                                     ~2
          7      > RETURN                                                   1

Function ip_in_range:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 224
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 221
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 221
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 220
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 25
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 221
Branch analysis from position: 221
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 145
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 47, Position 2 = 71
Branch analysis from position: 47
2 jumps found. (Code = 43) Position 1 = 69, Position 2 = 70
Branch analysis from position: 69
1 jumps found. (Code = 42) Position 1 = 221
Branch analysis from position: 221
Branch analysis from position: 70
1 jumps found. (Code = 42) Position 1 = 144
Branch analysis from position: 144
1 jumps found. (Code = 42) Position 1 = 220
Branch analysis from position: 220
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 71
1 jumps found. (Code = 42) Position 1 = 79
Branch analysis from position: 79
2 jumps found. (Code = 44) Position 1 = 82, Position 2 = 77
Branch analysis from position: 82
2 jumps found. (Code = 43) Position 1 = 96, Position 2 = 98
Branch analysis from position: 96
1 jumps found. (Code = 42) Position 1 = 99
Branch analysis from position: 99
2 jumps found. (Code = 43) Position 1 = 102, Position 2 = 104
Branch analysis from position: 102
1 jumps found. (Code = 42) Position 1 = 105
Branch analysis from position: 105
2 jumps found. (Code = 43) Position 1 = 108, Position 2 = 110
Branch analysis from position: 108
1 jumps found. (Code = 42) Position 1 = 111
Branch analysis from position: 111
2 jumps found. (Code = 43) Position 1 = 114, Position 2 = 116
Branch analysis from position: 114
1 jumps found. (Code = 42) Position 1 = 117
Branch analysis from position: 117
2 jumps found. (Code = 43) Position 1 = 143, Position 2 = 144
Branch analysis from position: 143
1 jumps found. (Code = 42) Position 1 = 221
Branch analysis from position: 221
Branch analysis from position: 144
Branch analysis from position: 116
2 jumps found. (Code = 43) Position 1 = 143, Position 2 = 144
Branch analysis from position: 143
Branch analysis from position: 144
Branch analysis from position: 110
2 jumps found. (Code = 43) Position 1 = 114, Position 2 = 116
Branch analysis from position: 114
Branch analysis from position: 116
Branch analysis from position: 104
2 jumps found. (Code = 43) Position 1 = 108, Position 2 = 110
Branch analysis from position: 108
Branch analysis from position: 110
Branch analysis from position: 98
2 jumps found. (Code = 43) Position 1 = 102, Position 2 = 104
Branch analysis from position: 102
Branch analysis from position: 104
Branch analysis from position: 77
2 jumps found. (Code = 44) Position 1 = 82, Position 2 = 77
Branch analysis from position: 82
Branch analysis from position: 77
Branch analysis from position: 145
2 jumps found. (Code = 43) Position 1 = 151, Position 2 = 167
Branch analysis from position: 151
2 jumps found. (Code = 43) Position 1 = 173, Position 2 = 218
Branch analysis from position: 173
2 jumps found. (Code = 46) Position 1 = 212, Position 2 = 214
Branch analysis from position: 212
2 jumps found. (Code = 43) Position 1 = 217, Position 2 = 218
Branch analysis from position: 217
1 jumps found. (Code = 42) Position 1 = 221
Branch analysis from position: 221
Branch analysis from position: 218
1 jumps found. (Code = 42) Position 1 = 221
Branch analysis from position: 221
Branch analysis from position: 214
Branch analysis from position: 218
Branch analysis from position: 167
Branch analysis from position: 220
Branch analysis from position: 221
Branch analysis from position: 221
Branch analysis from position: 224
2 jumps found. (Code = 43) Position 1 = 226, Position 2 = 228
Branch analysis from position: 226
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 228
2 jumps found. (Code = 43) Position 1 = 230, Position 2 = 232
Branch analysis from position: 230
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 232
2 jumps found. (Code = 43) Position 1 = 238, Position 2 = 346
Branch analysis from position: 238
2 jumps found. (Code = 43) Position 1 = 254, Position 2 = 275
Branch analysis from position: 254
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 275
1 jumps found. (Code = 42) Position 1 = 283
Branch analysis from position: 283
2 jumps found. (Code = 44) Position 1 = 286, Position 2 = 281
Branch analysis from position: 286
2 jumps found. (Code = 43) Position 1 = 300, Position 2 = 302
Branch analysis from position: 300
1 jumps found. (Code = 42) Position 1 = 303
Branch analysis from position: 303
2 jumps found. (Code = 43) Position 1 = 306, Position 2 = 308
Branch analysis from position: 306
1 jumps found. (Code = 42) Position 1 = 309
Branch analysis from position: 309
2 jumps found. (Code = 43) Position 1 = 312, Position 2 = 314
Branch analysis from position: 312
1 jumps found. (Code = 42) Position 1 = 315
Branch analysis from position: 315
2 jumps found. (Code = 43) Position 1 = 318, Position 2 = 320
Branch analysis from position: 318
1 jumps found. (Code = 42) Position 1 = 321
Branch analysis from position: 321
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 320
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 314
2 jumps found. (Code = 43) Position 1 = 318, Position 2 = 320
Branch analysis from position: 318
Branch analysis from position: 320
Branch analysis from position: 308
2 jumps found. (Code = 43) Position 1 = 312, Position 2 = 314
Branch analysis from position: 312
Branch analysis from position: 314
Branch analysis from position: 302
2 jumps found. (Code = 43) Position 1 = 306, Position 2 = 308
Branch analysis from position: 306
Branch analysis from position: 308
Branch analysis from position: 281
2 jumps found. (Code = 44) Position 1 = 286, Position 2 = 281
Branch analysis from position: 286
Branch analysis from position: 281
Branch analysis from position: 346
2 jumps found. (Code = 43) Position 1 = 352, Position 2 = 368
Branch analysis from position: 352
2 jumps found. (Code = 43) Position 1 = 374, Position 2 = 416
Branch analysis from position: 374
2 jumps found. (Code = 46) Position 1 = 413, Position 2 = 415
Branch analysis from position: 413
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 415
Branch analysis from position: 416
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 368
filename:       /in/XcZYI
function name:  ip_in_range
number of ops:  418
compiled vars:  !0 = $ip, !1 = $range, !2 = $array_range, !3 = $return, !4 = $rangeIP, !5 = $key, !6 = $netmask, !7 = $netmask_dec, !8 = $x, !9 = $a, !10 = $b, !11 = $c, !12 = $d, !13 = $range_dec, !14 = $ip_dec, !15 = $wildcard_dec, !16 = $lower, !17 = $upper, !18 = $lower_dec, !19 = $upper_dec
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        ASSIGN                                                   !2, <array>
    7     3        INIT_FCALL                                               'strpos'
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 '%2C'
          6        DO_ICALL                                         $21     
          7        TYPE_CHECK                                  1018          $21
          8      > JMPZ                                                     ~22, ->224
    8     9    >   ASSIGN                                                   !3, <true>
   10    10        INIT_FCALL                                               'explode'
         11        SEND_VAL                                                 '%2C'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $24     
         14        ASSIGN                                                   !2, $24
   12    15      > FE_RESET_R                                       $26     !2, ->221
         16    > > FE_FETCH_R                                       ~27     $26, !4, ->221
         17    >   ASSIGN                                                   !5, ~27
   13    18        ECHO                                                     !4
   14    19      > JMPZ                                                     !4, ->220
   16    20    >   IS_NOT_EQUAL                                             !0, !1
         21      > JMPZ                                                     ~29, ->25
   17    22    >   ASSIGN                                                   !3, <false>
   18    23      > JMP                                                      ->221
         24*       JMP                                                      ->220
   19    25    >   INIT_FCALL                                               'strpos'
         26        SEND_VAR                                                 !4
         27        SEND_VAL                                                 '%2F'
         28        DO_ICALL                                         $31     
         29        TYPE_CHECK                                  1018          $31
         30      > JMPZ                                                     ~32, ->145
   21    31    >   INIT_FCALL                                               'explode'
         32        SEND_VAL                                                 '%2F'
         33        SEND_VAR                                                 !4
         34        SEND_VAL                                                 2
         35        DO_ICALL                                         $33     
         36        FETCH_LIST_R                                     $34     $33, 0
         37        ASSIGN                                                   !4, $34
         38        FETCH_LIST_R                                     $36     $33, 1
         39        ASSIGN                                                   !6, $36
         40        FREE                                                     $33
   22    41        INIT_FCALL                                               'strpos'
         42        SEND_VAR                                                 !6
         43        SEND_VAL                                                 '.'
         44        DO_ICALL                                         $38     
         45        TYPE_CHECK                                  1018          $38
         46      > JMPZ                                                     ~39, ->71
   24    47    >   INIT_FCALL                                               'str_replace'
         48        SEND_VAL                                                 '%2A'
         49        SEND_VAL                                                 '0'
         50        SEND_VAR                                                 !6
         51        DO_ICALL                                         $40     
         52        ASSIGN                                                   !6, $40
   25    53        INIT_FCALL                                               'ip2long'
         54        SEND_VAR                                                 !6
         55        DO_ICALL                                         $42     
         56        ASSIGN                                                   !7, $42
   27    57        INIT_FCALL                                               'ip2long'
         58        SEND_VAR                                                 !0
         59        DO_ICALL                                         $44     
         60        BW_AND                                           ~45     !7, $44
         61        INIT_FCALL                                               'ip2long'
         62        SEND_VAR                                                 !4
         63        DO_ICALL                                         $46     
         64        BW_AND                                           ~47     !7, $46
         65        IS_EQUAL                                         ~48     ~45, ~47
         66        ASSIGN                                                   !3, ~48
   28    67        BOOL_NOT                                         ~50     !3
         68      > JMPZ                                                     ~50, ->70
   29    69    > > JMP                                                      ->221
         70    > > JMP                                                      ->144
   34    71    >   INIT_FCALL                                               'explode'
         72        SEND_VAL                                                 '.'
         73        SEND_VAR                                                 !4
         74        DO_ICALL                                         $51     
         75        ASSIGN                                                   !8, $51
   35    76      > JMP                                                      ->79
         77    >   ASSIGN_DIM                                               !8
         78        OP_DATA                                                  '0'
         79    >   COUNT                                            ~54     !8
         80        IS_SMALLER                                               ~54, 4
         81      > JMPNZ                                                    ~55, ->77
   36    82    >   QM_ASSIGN                                        ~56     !8
         83        FETCH_LIST_R                                     $57     ~56, 0
         84        ASSIGN                                                   !9, $57
         85        FETCH_LIST_R                                     $59     ~56, 1
         86        ASSIGN                                                   !10, $59
         87        FETCH_LIST_R                                     $61     ~56, 2
         88        ASSIGN                                                   !11, $61
         89        FETCH_LIST_R                                     $63     ~56, 3
         90        ASSIGN                                                   !12, $63
         91        FREE                                                     ~56
   37    92        INIT_FCALL                                               'sprintf'
         93        SEND_VAL                                                 '%25u.%25u.%25u.%25u'
         94        ISSET_ISEMPTY_CV                                         !9
         95      > JMPZ                                                     ~65, ->98
         96    >   QM_ASSIGN                                        ~66     '0'
         97      > JMP                                                      ->99
         98    >   QM_ASSIGN                                        ~66     !9
         99    >   SEND_VAL                                                 ~66
        100        ISSET_ISEMPTY_CV                                         !10
        101      > JMPZ                                                     ~67, ->104
        102    >   QM_ASSIGN                                        ~68     '0'
        103      > JMP                                                      ->105
        104    >   QM_ASSIGN                                        ~68     !10
        105    >   SEND_VAL                                                 ~68
        106        ISSET_ISEMPTY_CV                                         !11
        107      > JMPZ                                                     ~69, ->110
        108    >   QM_ASSIGN                                        ~70     '0'
        109      > JMP                                                      ->111
        110    >   QM_ASSIGN                                        ~70     !11
        111    >   SEND_VAL                                                 ~70
        112        ISSET_ISEMPTY_CV                                         !12
        113      > JMPZ                                                     ~71, ->116
        114    >   QM_ASSIGN                                        ~72     '0'
        115      > JMP                                                      ->117
        116    >   QM_ASSIGN                                        ~72     !12
        117    >   SEND_VAL                                                 ~72
        118        DO_ICALL                                         $73     
        119        ASSIGN                                                   !4, $73
   38   120        INIT_FCALL                                               'ip2long'
        121        SEND_VAR                                                 !4
        122        DO_ICALL                                         $75     
        123        ASSIGN                                                   !13, $75
   39   124        INIT_FCALL                                               'ip2long'
        125        SEND_VAR                                                 !0
        126        DO_ICALL                                         $77     
        127        ASSIGN                                                   !14, $77
   45   128        INIT_FCALL                                               'pow'
        129        SEND_VAL                                                 2
        130        SUB                                              ~79     32, !6
        131        SEND_VAL                                                 ~79
        132        DO_ICALL                                         $80     
        133        SUB                                              ~81     $80, 1
        134        ASSIGN                                                   !15, ~81
   46   135        BW_NOT                                           ~83     !15
        136        ASSIGN                                                   !7, ~83
   48   137        BW_AND                                           ~85     !14, !7
        138        BW_AND                                           ~86     !13, !7
        139        IS_EQUAL                                         ~87     ~85, ~86
        140        ASSIGN                                                   !3, ~87
   49   141        BOOL_NOT                                         ~89     !3
        142      > JMPZ                                                     ~89, ->144
   50   143    > > JMP                                                      ->221
        144    > > JMP                                                      ->220
   55   145    >   INIT_FCALL                                               'strpos'
        146        SEND_VAR                                                 !4
        147        SEND_VAL                                                 '%2A'
        148        DO_ICALL                                         $90     
        149        TYPE_CHECK                                  1018          $90
        150      > JMPZ                                                     ~91, ->167
   57   151    >   INIT_FCALL                                               'str_replace'
        152        SEND_VAL                                                 '%2A'
        153        SEND_VAL                                                 '0'
        154        SEND_VAR                                                 !4
        155        DO_ICALL                                         $92     
        156        ASSIGN                                                   !16, $92
   58   157        INIT_FCALL                                               'str_replace'
        158        SEND_VAL                                                 '%2A'
        159        SEND_VAL                                                 '255'
        160        SEND_VAR                                                 !4
        161        DO_ICALL                                         $94     
        162        ASSIGN                                                   !17, $94
   59   163        ROPE_INIT                                     3  ~97     !16
        164        ROPE_ADD                                      1  ~97     ~97, '-'
        165        ROPE_END                                      2  ~96     ~97, !17
        166        ASSIGN                                                   !4, ~96
   62   167    >   INIT_FCALL                                               'strpos'
        168        SEND_VAR                                                 !4
        169        SEND_VAL                                                 '-'
        170        DO_ICALL                                         $100    
        171        TYPE_CHECK                                  1018          $100
        172      > JMPZ                                                     ~101, ->218
   63   173    >   INIT_FCALL                                               'explode'
        174        SEND_VAL                                                 '-'
        175        SEND_VAR                                                 !4
        176        SEND_VAL                                                 2
        177        DO_ICALL                                         $102    
        178        FETCH_LIST_R                                     $103    $102, 0
        179        ASSIGN                                                   !16, $103
        180        FETCH_LIST_R                                     $105    $102, 1
        181        ASSIGN                                                   !17, $105
        182        FREE                                                     $102
   64   183        INIT_FCALL                                               'sprintf'
        184        SEND_VAL                                                 '%25u'
        185        INIT_FCALL                                               'ip2long'
        186        SEND_VAR                                                 !16
        187        DO_ICALL                                         $107    
        188        SEND_VAR                                                 $107
        189        DO_ICALL                                         $108    
        190        CAST                                          5  ~109    $108
        191        ASSIGN                                                   !18, ~109
   65   192        INIT_FCALL                                               'sprintf'
        193        SEND_VAL                                                 '%25u'
        194        INIT_FCALL                                               'ip2long'
        195        SEND_VAR                                                 !17
        196        DO_ICALL                                         $111    
        197        SEND_VAR                                                 $111
        198        DO_ICALL                                         $112    
        199        CAST                                          5  ~113    $112
        200        ASSIGN                                                   !19, ~113
   66   201        INIT_FCALL                                               'sprintf'
        202        SEND_VAL                                                 '%25u'
        203        INIT_FCALL                                               'ip2long'
        204        SEND_VAR                                                 !0
        205        DO_ICALL                                         $115    
        206        SEND_VAR                                                 $115
        207        DO_ICALL                                         $116    
        208        CAST                                          5  ~117    $116
        209        ASSIGN                                                   !14, ~117
   67   210        IS_SMALLER_OR_EQUAL                              ~119    !18, !14
        211      > JMPZ_EX                                          ~119    ~119, ->214
        212    >   IS_SMALLER_OR_EQUAL                              ~120    !14, !19
        213        BOOL                                             ~119    ~120
        214    >   ASSIGN                                                   !3, ~119
   68   215        BOOL_NOT                                         ~122    !3
        216      > JMPZ                                                     ~122, ->218
   69   217    > > JMP                                                      ->221
   72   218    >   ASSIGN                                                   !3, <false>
   73   219      > JMP                                                      ->221
   12   220    > > JMP                                                      ->16
        221    >   FE_FREE                                                  $26
   77   222      > RETURN                                                   !3
        223*       JMP                                                      ->417
   81   224    >   BOOL_NOT                                         ~124    !1
        225      > JMPZ                                                     ~124, ->228
   82   226    > > RETURN                                                   <true>
        227*       JMP                                                      ->417
   84   228    >   IS_EQUAL                                                 !0, !1
        229      > JMPZ                                                     ~125, ->232
   85   230    > > RETURN                                                   <true>
        231*       JMP                                                      ->417
   87   232    >   INIT_FCALL                                               'strpos'
        233        SEND_VAR                                                 !1
        234        SEND_VAL                                                 '%2F'
        235        DO_ICALL                                         $126    
        236        TYPE_CHECK                                  1018          $126
        237      > JMPZ                                                     ~127, ->346
   89   238    >   INIT_FCALL                                               'explode'
        239        SEND_VAL                                                 '%2F'
        240        SEND_VAR                                                 !1
        241        SEND_VAL                                                 2
        242        DO_ICALL                                         $128    
        243        FETCH_LIST_R                                     $129    $128, 0
        244        ASSIGN                                                   !1, $129
        245        FETCH_LIST_R                                     $131    $128, 1
        246        ASSIGN                                                   !6, $131
        247        FREE                                                     $128
   90   248        INIT_FCALL                                               'strpos'
        249        SEND_VAR                                                 !6
        250        SEND_VAL                                                 '.'
        251        DO_ICALL                                         $133    
        252        TYPE_CHECK                                  1018          $133
        253      > JMPZ                                                     ~134, ->275
   92   254    >   INIT_FCALL                                               'str_replace'
        255        SEND_VAL                                                 '%2A'
        256        SEND_VAL                                                 '0'
        257        SEND_VAR                                                 !6
        258        DO_ICALL                                         $135    
        259        ASSIGN                                                   !6, $135
   93   260        INIT_FCALL                                               'ip2long'
        261        SEND_VAR                                                 !6
        262        DO_ICALL                                         $137    
        263        ASSIGN                                                   !7, $137
   94   264        INIT_FCALL                                               'ip2long'
        265        SEND_VAR                                                 !0
        266        DO_ICALL                                         $139    
        267        BW_AND                                           ~140    !7, $139
        268        INIT_FCALL                                               'ip2long'
        269        SEND_VAR                                                 !1
        270        DO_ICALL                                         $141    
        271        BW_AND                                           ~142    !7, $141
        272        IS_EQUAL                                         ~143    ~140, ~142
        273      > RETURN                                                   ~143
        274*       JMP                                                      ->345
   98   275    >   INIT_FCALL                                               'explode'
        276        SEND_VAL                                                 '.'
        277        SEND_VAR                                                 !1
        278        DO_ICALL                                         $144    
        279        ASSIGN                                                   !8, $144
   99   280      > JMP                                                      ->283
        281    >   ASSIGN_DIM                                               !8
        282        OP_DATA                                                  '0'
        283    >   COUNT                                            ~147    !8
        284        IS_SMALLER                                               ~147, 4
        285      > JMPNZ                                                    ~148, ->281
  100   286    >   QM_ASSIGN                                        ~149    !8
        287        FETCH_LIST_R                                     $150    ~149, 0
        288        ASSIGN                                                   !9, $150
        289        FETCH_LIST_R                                     $152    ~149, 1
        290        ASSIGN                                                   !10, $152
        291        FETCH_LIST_R                                     $154    ~149, 2
        292        ASSIGN                                                   !11, $154
        293        FETCH_LIST_R                                     $156    ~149, 3
        294        ASSIGN                                               

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.34 ms | 1431 KiB | 26 Q