Re: Resources patch
| From: | Sterling Hughes | Date: | Fri, 20 Oct 2000 05:27:49 +0000 |
| Subject: | Re: Resources patch | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-35616@lists.php.net to get a copy of this message | ||
> I've noticed that PHP has function get_resource_type() but it doesn't
> really do anything except return 'Unknown'. This was due to several
> reasons, main ones being that zend_rsrc_list_get_rsrc_type() was broken
> and that the modules did not really register their type names. This
> patch is supposed to fix this.
>
> I've also modified var_dump() to print resource type name.
>
> The consequence is that it is necessary to supply resource type name
> when calling register list destructors, and I've taken care of existing
> modules already.
>
> Example:
>
> <?
> $fp = fopen("foo", "r");
> var_dump(get_resource_type($fp));
> var_dump($fp);
> ?>
>
> string(4) "file"
> resource(1) of type (file)
>
> If no one objects, I'll commit it soon.
>
> -Andrei
Looks and sounds good.
One thing though, I changed cURL's list handling (moved it to a static int
within the local file), so the diff should be changed to reflect that (removing
of the CURLLS_FETCH() and the CURLG()).
-Sterling