>> Couldn't you have used parts of ext/standard/base64.c here instead of
>> duplicating code?
>
> At first I thought of using php_base64_encode() and php_base64_decode()
> rather than reimplementing them. But because those functions are
> designed to be used in string semantics while streams require a
> different facility due to its statefulness, I couldn't use the existing
> implementation.
>
Speaking of filter "string.base64" I have an issue with its parity.

string.base64 will encode on write and decode on read... What if the user
wants the other way round?  Is the expected behavior even obvious from the
name alone?  Should there be two separate filters? string.base64-encode &
string.base64-decode with each doing the same opperation on either read or
write?

I'm personally conflicted on which way it should be, but I wanted to raise
the questions so that we could dialouge.

The questions apply to string.quoted-printable for that matter.  ((
string.rot13 is fully symmetric so its the same no matter how you slice
it, and string.to(upp|low)er are both fully asymmetric so only one
implementation makes any sense. ))

-Pollita



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to