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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.79 ms | 1431 KiB | 26 Q