Cast to resource

E_STRICT says you cannot use a resource as a key for a hashtable, the engine 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 ?