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) { 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 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/4AgvD
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  134     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        ECHO                                                     $0
          5      > RETURN                                                   1

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.61 ms | 1431 KiB | 26 Q