On 6 May 2001, Manuel Lemos wrote:
> Hello Andi,
> On 27-Apr-01 19:18:12, you wrote:
> >At 06:03 PM 4/27/2001 -0400, Joe Brown wrote:
> >>Run into a spot of trouble using Metabase(db wrapper) because of it's use of
> >>casting a $var=intval($resource) where OCIFreeCursor fails to function after
> >>it has been casted.
> >>Guessing that it fails because intval is creating a reference to the
> >>resource, in turn OCI does not release the resource because there additional
> >>reference exist.
> >>I'd like to start working on fixing this, but don't know which behaviour to
> >>attack. Does OCI need to be fixed or intval()?
> >>Suggestions anyone...
> >Is there a good reason it needs to use intval() on the resource? To be
> Just to overcome a past bug in PHP 4.0.(?). It was making resource values
> inconsistently turn into strings when used as array indexes. A user
> reported a bug on Metabase because of that when it turned out to be a PHP
> bug. The workaround of using intval() made the bug effect go away.
This shouldn't be happening (does it still happen for you?) The only time
when a resource should be represented as a string is if you print it out,
in which case that is the proper behaviour.
> >quite honest intval() shouldn't really return a valid value for resources
> >and just by chance it returns the resource id which is probably not a good
> >We can try and look into fixing this problem though.
> Resource values should be integers to be consistent with the PHP
Resource values are internally integers (well, no actually they're
"long"'s but so are PHP's integers, anyyyyyyyway). They're an
abstract type so they should be shown as such, and not have an integer
And the PHP documentation should be consistent with the PHP source, not
the other way around :)
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]