Rangel Reale wrote: > I am testing my 25000 lines PHP5 application on PHP6, just to see what > changes it would require. I changed exactly 5 (yes only 5) lines of > code, and it worked perfectly except for the functions that requires > binary string parameters with a (binary) typecast. > > What I am thinking is, if unicode_semantics=on, every single time I need > to call urlencode (or other binary-only functions) with a variable, I > need to typecast it. Well, if this is necessary 100% of the times, why > not do this already inside urlencode, and if the string contains bad > characters, give the same warning I get on the (binary) typecast on an > incompatible string? I am just trying to think logically, I don't know > the amout of work something like this would generate. > > If this is done, ate least 1 25000 lines PHP application will work on > PHP6 with 5 line changes. I think this is great marketing for PHP6 > migration.
Yes, I am sure we can do something intelligent with some of these cases. It's still quite early in the migration and we are likely to revisit many of these functions to make them more flexible. I don't really see why urlencode() shouldn't be smarter about handling Unicode strings. -Rasmus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php