Skip to content

Make array to string conversion a recoverable error #1389

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

Closed
wants to merge 1 commit into from

Conversation

hikari-no-yume
Copy link
Contributor

Implements this RFC: https://wiki.php.net/rfc/array-to-string

Does not update any of the numerous tests it breaks. Also, given that engine exceptions passed, it might be better to make this throw an exception instead.

But by making this pull request, I might give the fact this RFC is unimplemented more attention.

@laruence laruence added the RFC label Jul 6, 2015
@cmb69
Copy link
Member

cmb69 commented Jul 6, 2015

Good catch, Andrea. Note that there is also PR #991 which is basically identical.

BTW: I'm pretty much surprised to see that there are several PRs targeting PHP 7 with pending implementation. If I'm not mistaken 7.0.0beta1 will be tagged tomorrow.

@hikari-no-yume
Copy link
Contributor Author

So @nikic informed me that the reason this hasn't been implemented yet is that the Exceptions in the Engine RFC passed, so we'd have to make it throw an exception, yet unfortunately we can't allow anything used in __toString to throw exceptions.

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

Successfully merging this pull request may close these issues.

3 participants