Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cast to resource #435

Closed
wants to merge 2 commits into from
Closed

Cast to resource #435

wants to merge 2 commits into from

Conversation

krakjoe
Copy link
Member

@krakjoe krakjoe commented Sep 10, 2013

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

$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 ?

@m6w6
Copy link
Contributor

m6w6 commented Oct 3, 2013

+1

@krakjoe krakjoe closed this Nov 2, 2013
@m6w6
Copy link
Contributor

m6w6 commented Nov 5, 2013

Has this been implemented or what?

@krakjoe
Copy link
Member Author

krakjoe commented Nov 5, 2013

No, it apparently broke some rules, I forget which ... anyone ??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants