Home » Networking » Net_Ping » Bug #3903
Documentation Inconsistency
Details
| Submitted | 2005-03-21 16:56 UTC |
|---|---|
| From | brent at malk dot net |
| Assigned | cweiske |
| Status | Closed |
| Package | Net_Ping |
| PHP Version | 4.3.10 |
| OS | Windows 2000 |
| Roadmaps | (Not assigned) |
Comments
[2005-03-21 16:56 UTC] brent at malk dot net
Description:
------------
The documentation example on pear.php.net manual doesn't work. But the example in \docs\examples does. Also this isn't a path issue for me because I changed the require_once in the example to "Net/Ping.php"
Reproduce code:
---------------
<?php
require_once 'Net/Ping.php' ;
$ping = new Net_Ping;
$ping->setArgs(array("count" => 5,
"size" => 32,
"ttl" => 512
)
);
var_dump($ping->ping("example.com"));
?>
vs
<?php
require_once "../../Ping.php";
$ping = Net_Ping::factory();
if(PEAR::isError($ping)) {
echo $ping->getMessage();
} else {
$ping->setArgs(array('count' => 2, 'deadline' => 1));
var_dump($ping->ping('example.com'));
}
?>
[2005-09-04 17:35 UTC] jeff at porncoconuts dot com
Erg... I just wasted a lot of time because of this. Is anyone
maintaining this package anymore?