Hi, On 6/29/07, Tomas Kuliavas <[EMAIL PROTECTED]> wrote:
For me it means that I have to maintain wrappers for fwrite, base64_encode, ord, crc32 and all other unicode aware functions. Any direct PHP string or stream function call can cause compatibility issues or notices. Any function working with binary data will need separate version for PHP6. Instead of having unicode switches in interpreter itself, I'll have to implement them in scripts. Talk about performance issues after that.
Use the right mode (and stream mode) for the right task solves this problem. If it does not, there is a bug and it has to be fixed. But it is possible to work with binary data in php6 just like it was in php5. The "only" difference is that we have now a working unicode support which includes true binary data and true unicode data instead of the all-in-one storage used in previous versions (5.x and earlier). It is certainly not perfect (see the recent discussions about file_put_contents in our bug tracker for example), but we are on the right track. If you have issues/bugs with the way binary strings are handle (in stream or any other functions) please report them and we will do our best to fix them. But not being able to use the same code with php6 and 5.1 is not a bug. It is simply not possible. You need two files and the performance impact is minimum here (same interface, two implementations). --Pierre -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php