PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Networking » Net_Ping » Bug #3903

Documentation Inconsistency

Details

Submitted2005-03-21 16:56 UTC
Frombrent at malk dot net
Assignedcweiske
StatusClosed
PackageNet_Ping
PHP Version4.3.10
OSWindows 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?