#20711 [Bgs]: ressource id are incorrect
| From: | wez@php.net | Date: | Fri, 29 Nov 2002 13:10:43 +0000 |
| Subject: | #20711 [Bgs]: ressource id are incorrect | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-26181@lists.php.net to get a copy of this message | ||
ID: 20711
Updated by: wez@php.net
Reported By: f.labanvoye@cg70.fr
Status: Bogus
Bug Type: Unknown/Other Function
Operating System: Windows 2000 and linux
PHP Version: 4.3.0RC2
New Comment:
The ID numbers assigned to PHP are internal to PHP and the Zend Engine;
your scripts should not make any assumptions about the numbers or the
apparent sequence of allocation; to do so is to write a buggy PHP
script.
Just don't do it :)
Previous Comments:
------------------------------------------------------------------------
[2002-11-29 03:14:44] f.labanvoye@cg70.fr
Sorry, but it's bugs.
I know that i should send only 1 bug per submission but the solution
for both bug concern the same part of code (in my opinion) and the
first bug (resource id >=2) is a very little bug to solve.
So, i think you should take a little more time to answers bug report
and/or give a better reason for a reject.
Thanks
------------------------------------------------------------------------
[2002-11-29 02:46:26] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
------------------------------------------------------------------------
[2002-11-29 02:38:14] f.labanvoye@cg70.fr
First, I notice that the ressource id given by some function is always
greater or egal to 2 with php-4.3.0RC1 and 4.3.0RC2.
script:
<?php
$ds = ldap_connect ( $ldaphost );
echo $ds;
?>
output:
ressource id #2
Second, the ressource id is always increased even if the function
failed. ie
script:
<?php
$fp = fopen ( 'not_existing_file', 'r');
echo '-'.$fp.'-<br>';
$ds = ldap_connect ( $ldaphost );
echo '-'.$ds.'-';
?>
output:
--
-ressource id#3-
Thanks
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20711&edit=1