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

Casting resource to int #1524

Closed
maciejmrozinski opened this issue Apr 26, 2017 · 1 comment
Closed

Casting resource to int #1524

maciejmrozinski opened this issue Apr 26, 2017 · 1 comment
Assignees
Labels

Comments

@maciejmrozinski
Copy link

maciejmrozinski commented Apr 26, 2017

Hi,

Found an unexpected result when casting resources to ints (common thing in PHP):

    var key;
    let key =  (int) stream; //stream is resource #127
    echo $key;

Expected:
127
Current:
1

I always receive 1 instead of resource id. intval is also not working. strval gets Resource id #127

@sergeyklay
Copy link
Contributor

Fixed in the 0.10.11 version. Thank you for the report, and for helping us make Zephir better.

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

No branches or pull requests

3 participants