3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ip_in_range($ip, $range) { $array_range = array(); echo (int)(strpos($range, ",") !== false); if(strpos($range, ",") !== false) { // Varias faixas de ip $return = true; $array_range = explode(",", $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 (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/XQBHP
function name:  (null)
number of ops:  7
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        ECHO                                                     ~1
          6      > RETURN                                                   1

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.21 ms | 1431 KiB | 26 Q