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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.56 ms | 1431 KiB | 26 Q