Doc #19401 [Bgs->Csd]: Please, add usage example
| From: | alexander dot merz at gmail dot com | Date: | Fri, 27 Apr 2012 02:25:51 +0000 |
| Subject: | Doc #19401 [Bgs->Csd]: Please, add usage example | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-8587@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=19401&edit=1
ID: 19401
Updated by: alexander.merz@gmail.com
Reported By: midget at midworld dot net
Summary: Please, add usage example
-Status: Bogus
+Status: Closed
Type: Documentation Problem
Package: Net_IPv6
Operating System: Debian GNU/Linux
Package Version: 1.2.2b2
PHP Version: Irrelevant
Assigned To: alexmerz
Roadmap Versions:
New Comment:
-Status: Bogus
+Status: Closed
I've no idea, how many people install a developer library without having
a specific problem to solve in first place, but feel free to go ahead.
Previous Comments:
------------------------------------------------------------------------
[2012-04-27 02:48:04] midget
Since after installing the package under Debian, users don't have any
hint on how to use it (because the manual URL is not provided by the
package), I've added that sample page.
Maybe It's a better idea if I add in the distributed package (ie: README
file) a pointer to
http://pear.php.net/manual/en/package.networking.net-ipv6.php
Thanks anyway.
Regards,
------------------------------------------------------------------------
[2012-04-27 02:39:47] alexmerz
I want to be sure - You want to use the package, have a basic
understanding of PHP and IPv6, and you took a look at
http://pear.php.net/manual/en/package.networking.net-ipv6.php
but you still need an usage example to write:
require_once 'Net/IPv6.php';
if(Net_IPv6::checkIp('fe80::21b:eedf:0:eff2')) {
echo "ok";
} else {
echo "not ok";
}
------------------------------------------------------------------------
[2012-04-27 02:29:40] midget
The sample produces these outputs, which cover most of the class
methods:
$netipv6->separate(fe80::21b:eedf:0:eff2/64)
--------------------------------------------------------------------------
array(2) {
[0]=>
string(21) "fe80::21b:eedf:0:eff2"
[1]=>
string(2) "64"
}
$netipv6->removePrefixLength(fe80::21b:eedf:0:eff2/64)
--------------------------------------------------------------------------
fe80::21b:eedf:0:eff2
$netipv6->getNetmaskSpec(fe80::21b:eedf:0:eff2/64)
--------------------------------------------------------------------------
64
$netipv6->getPrefixLength(fe80::21b:eedf:0:eff2/64)
--------------------------------------------------------------------------
64
$netipv6->getNetmask(fe80::21b:eedf:0:eff2/64)
--------------------------------------------------------------------------
fe80:0:0:0:0:0:0:0
$netipv6->getAddressType(fe80::21b:eedf:0:eff2)
--------------------------------------------------------------------------
42
$netipv6->uncompress(fe80::21b:eedf:0:eff2)
--------------------------------------------------------------------------
fe80:0:0:0:21b:eedf:0:eff2
$netipv6->compress(fe80::21b:eedf:0:eff2)
--------------------------------------------------------------------------
fe80::21b:eedf:0:eff2
$netipv6->recommendedFormat(fe80::21b:eedf:0:eff2)
--------------------------------------------------------------------------
fe80::21b:eedf:0:eff2
$netipv6->SplitV64(fe80::21b:eedf:0:eff2/64)
--------------------------------------------------------------------------
array(2) {
[0]=>
string(26) "fe80:0:0:0:21b:eedf:0:eff2"
[1]=>
string(0) ""
}
$netipv6->checkIPv6(fe80::21b:eedf:0:eff2)
--------------------------------------------------------------------------
1
$netipv6->parseAddress(fe80::21b:eedf:0:eff2/64)
--------------------------------------------------------------------------
array(2) {
["start"]=>
string(18) "fe80:0:0:0:0:0:0:0"
["end"]=>
string(30) "fe80:0:0:0:ffff:ffff:ffff:ffff"
}
$netipv6->_ip2Bin(fe80::21b:eedf:0:eff2)
--------------------------------------------------------------------------
11111110100000000000000000000000000000000000000000000000000000000000001000011011111011101101111100000000000000001110111111110010
$netipv6->_bin2Ip(fe80::21b:eedf:0:eff2)
--------------------------------------------------------------------------
0:0:0:0:0:0:0:2
Regards,
------------------------------------------------------------------------
[2012-04-27 02:18:33] midget
Hi,
I've added that dirty sample when uploaded php-net-ipv6 package to
Debian as a quick check for the package.
If you consider it not valid, can be used as a starting point for a
better one.
Regards,
------------------------------------------------------------------------
[2012-04-27 02:11:16] alexmerz
-Status: Open
+Status: Bogus
-Assigned To:
+Assigned To: alexmerz
Are this report and the example auto-generated?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://pear.php.net/bugs/bug.php?id=19401
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=19401&edit=1