| @@ 54-57 (lines=4) @@ | ||
| 51 | $ip = '0:0:0:0:0:0:0:0'; |
|
| 52 | } |
|
| 53 | // ::xxx |
|
| 54 | elseif ($c1 === -1) { |
|
| 55 | $fill = str_repeat('0:', 7 - $c2); |
|
| 56 | $ip = str_replace('::', $fill, $ip); |
|
| 57 | } |
|
| 58 | // xxx:: |
|
| 59 | elseif ($c2 === -1) { |
|
| 60 | $fill = str_repeat(':0', 7 - $c1); |
|
| @@ 59-62 (lines=4) @@ | ||
| 56 | $ip = str_replace('::', $fill, $ip); |
|
| 57 | } |
|
| 58 | // xxx:: |
|
| 59 | elseif ($c2 === -1) { |
|
| 60 | $fill = str_repeat(':0', 7 - $c1); |
|
| 61 | $ip = str_replace('::', $fill, $ip); |
|
| 62 | } |
|
| 63 | // xxx::xxx |
|
| 64 | else { |
|
| 65 | $fill = ':' . str_repeat('0:', 6 - $c2 - $c1); |
|