php/php-src — pull request #435 by krakjoe (2013-09-10 07:24:56+00:00)
Title: Cast to resource

E_STRICT says you cannot use a resource as a key for a hashtable, it casts the resource to long for use as a key and you have lost the ability to reference the key while looping over the table as the resource used to set it ...

If the engine is going to take automated action and coerce types then I should be able to conform with what it wants like

```php
$array[(integer)$resource] = $data;
...
foreach ($array as $id => $data) {
var_dump((resource)$id);
}
```

but because you cannot cast to resource you cannot do it ...

Thoughts ?