Hi,

Le 13/11/2015 04:30, Stanislav Malyshev a écrit :
Hi!

The reason for this is that the resource type is an anachronism from an
age in which PHP did not have objects, yet still needed to make certain
types of data opaque. The resource type is a type that exists only to
I think more specific reason is not that resource type is outdated, but
that resource is not really a type - it's a collection of types. Mysql
connection is a resource, and file is a resource, but they are certainly
not interchangeable. So typing a value as "resource" would not achieve
you much.


I agree. Some resources may disappear in the future but others, like opened streams, are not obsolete at all.

As 'resource' is not specific enough. What about including the resource type in some way ? Something like '@stream', '[stream]', '{stream}' ? Just need to replace spaces with underscores (e.g. 'persistent_stream').

Regards

François

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to