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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.9 ms | 1431 KiB | 26 Q