Re: intval($resource)

From: Date: Sat, 28 Apr 2001 12:28:40 +0000
Subject: Re: intval($resource)
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-52697@lists.php.net to get a copy of this message
There is a good reason AFAIK. Manuel Lemos' Metabase uses the intval of a resource as an array key for managing mutiple queries, etc. A "don't do that" responce does not help the situation, because it must in order to function the way it does. Manuel's Metabase is quite elegant PHP coding. I have written to metabase-dev on groups.yahoo.com in hopes for another resolution. As it stands now, I don't foresee simple solution to this issue. -- Having said that, 1. is there a good reason OCI shouldn't free the resource reguardless of the reference count? 2. Should intval not pump up the refcount when doing something silly like converting a resource to an integer? "Andi Gutmans" <andi@zend.com> wrote in message news:5.0.2.1.2.20010428011836.03ccb828@mail.zend.com... > 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 > 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 > thing. > We can try and look into fixing this problem though. > > Andi > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.dev (#52697) next »