Skip to content

Improve array to string conversion#991

Closed
flaupretre wants to merge 2 commits into
php:masterfrom
flaupretre:array-to-string
Closed

Improve array to string conversion#991
flaupretre wants to merge 2 commits into
php:masterfrom
flaupretre:array-to-string

Conversation

@flaupretre

Copy link
Copy Markdown
Contributor

For details, please refer to the RFC : https://wiki.php.net/rfc/array-to-string

@flaupretre flaupretre changed the title Improve arra to string conversion Improve array to string conversion Jan 11, 2015
@r3wt

r3wt commented Jan 11, 2015

Copy link
Copy Markdown

Seems like a terrible idea to me.

@flaupretre

Copy link
Copy Markdown
Contributor Author

Thanks for you return, but a little too short…

@JanTvrdik

Copy link
Copy Markdown

You should take into consideration that most PHP applications do not check whether variables received in $_GET, $_POST and $_COOKIE are not arrays. The framework I use handles this validation for me but most people are not so lucky.

@Majkl578

Copy link
Copy Markdown
Contributor

I think an error makes sense for array to string conversion. But concatenation is just a non-sense. Even worse behavior than simply returning "Array".

@flaupretre

Copy link
Copy Markdown
Contributor Author

Updated the RFC, removing my previous opinion because the only thing I'm sure now, is that we should find a better solution than the current one.

@flaupretre flaupretre force-pushed the array-to-string branch 2 times, most recently from 7f49636 to e92c810 Compare February 23, 2015 15:22
@patrickallaert

Copy link
Copy Markdown
Contributor

@flaupretre What about fixing tests?

@flaupretre

Copy link
Copy Markdown
Contributor Author

This RFC is withdrawn because the subject is far from mature and requires much more thoughts. Potential BC breaks also make it a candidate for a major release only.

@flaupretre flaupretre closed this Jan 2, 2016
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.

6 participants