Re: [PHP-DEV] intval($resource)

2001-05-06 Thread Manuel Lemos
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

Re: [PHP-DEV] intval($resource)

2001-05-06 Thread Sterling Hughes
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

Re: [PHP-DEV] intval($resource)

2001-05-06 Thread Manuel Lemos
Hello Sterling, On 07-May-01 00:53:37, you wrote: 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

Re: [PHP-DEV] intval($resource)

2001-04-28 Thread Joe Brown
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

Re: [PHP-DEV] intval($resource)

2001-04-28 Thread Andi Gutmans
At 08:28 AM 4/28/2001 -0400, Joe Brown wrote: Having said that, 1. is there a good reason OCI shouldn't free the resource reguardless of the reference count? There are different ways to look at this. Some people might think it should and some might think it shouldn't. I'm not even completely

Re: [PHP-DEV] intval($resource)

2001-04-28 Thread Thies C. Arntzen
On Sat, Apr 28, 2001 at 06:12:19PM +0200, Andi Gutmans wrote: At 08:28 AM 4/28/2001 -0400, Joe Brown wrote: Having said that, 1. is there a good reason OCI shouldn't free the resource reguardless of the reference count? the problem is that freeing resources that are still in use will

Re: [PHP-DEV] intval($resource)

2001-04-28 Thread Andi Gutmans
At 08:50 PM 4/28/2001 +0200, Thies C. Arntzen wrote: On Sat, Apr 28, 2001 at 06:12:19PM +0200, Andi Gutmans wrote: At 08:28 AM 4/28/2001 -0400, Joe Brown wrote: Having said that, 1. is there a good reason OCI shouldn't free the resource reguardless of the reference count? the

Re: [PHP-DEV] intval($resource)

2001-04-28 Thread Joe Brown
Andi Gutmans [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... At 08:50 PM 4/28/2001 +0200, Thies C. Arntzen wrote: On Sat, Apr 28, 2001 at 06:12:19PM +0200, Andi Gutmans wrote: At 08:28 AM 4/28/2001 -0400, Joe Brown wrote: Having said that, 1. is there a

Re: [PHP-DEV] intval($resource)

2001-04-28 Thread Joe Brown
Bah! My newsreader is freaking out on replies... Please accept apologies for null message. IMO. The resource should be freed upon request, reguardless of refcount. Further attempts to access the resource would then be in error. This logic makes sense to me. If the resource is not released,

Re: [PHP-DEV] intval($resource)

2001-04-27 Thread Andi Gutmans
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