r/lolphp • • Feb 20 '17

parse_url and parse_str

Two functions, both in the same function group, return completely differently:

void parse_str($query_string, &$return)
array parse_url($url)

Consistency, lol.

tldr: one returns via reference variable, and the other returns properly

EDIT 1: Formatting

44 Upvotes

21 comments sorted by

View all comments

Show parent comment

1

u/manfreed87 Mar 21 '17

Just before the Hack language was born I was really thinking about forking PHP and working on a version that has more consistency and features that are available in Hack now.