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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.62 ms | 1431 KiB | 26 Q