Re: Resources patch
| From: | Joey Smith | Date: | Fri, 20 Oct 2000 05:16:50 +0000 |
| Subject: | Re: Resources patch | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-35613@lists.php.net to get a copy of this message | ||
Very nice. I know Zeev had started on this awhile back...
On Thu, 19 Oct 2000, Andrei Zmievski wrote the following to PHP Developers :
> 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
>