ID:               41122
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mahesh dot vemula at in dot ibm dot com
-Status:           Open
+Status:           Closed
 Bug Type:         Documentation problem
 Operating System: RHEL 4
 PHP Version:      Irrelevant
 New Comment:

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.




Previous Comments:
------------------------------------------------------------------------

[2007-04-17 14:19:03] mahesh dot vemula at in dot ibm dot com

Description:
------------
fsockopen, pfsockopen, popen, and opendir functions use streams layer
Implementation. So, the resources created by these functions are of
stream type. But PHP5 documentation shows the resource type names
different in http://in2.php.net/manual/en/resource.php

Updation in this regard at http://in2.php.net/manual/en/resource.php is
required. The “Resource type name” column should be modified to “stream”
for functions: fsockopen(), pfsockopen(), popen() and opendir()

Below code confirms that the resources created by fopen, fsockopen,
pfsockopen, popen, and opendir functions are of stream type.

Environment:
Operating System: RHEL 4
Linux Kernel : Linux 2.6.9
PHP Version: PHP 5.2 (Built on Apr 17, 2007 from snaps.php.net)
PHP Configure Setup: ./configure


Reproduce code:
---------------
<?php
$file_handle  = fopen( __FILE__, "r" );
var_dump( get_resource_type($file_handle) );
fclose( $file_handle );

$dir_handle  = opendir( "." );
var_dump( get_resource_type($dir_handle) );
closedir( $dir_handle );

$pipe_handle = popen( "/bin/ls", "r" );
var_dump( get_resource_type($pipe_handle) );
pclose( $pipe_handle );

$socket_handle = fsockopen( "tcp://127.0.0.1", 23 );
var_dump( get_resource_type($socket_handle) );
fclose( $socket_handle );
?>


Expected result:
----------------
string(6) "stream"
string(6) "stream"
string(6) "stream"
string(6) "stream"


Actual result:
--------------
string(6) "stream"
string(6) "stream"
string(6) "stream"
string(6) "stream"



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=41122&edit=1

Reply via email to