On Wed, Jun 22, 2011 at 3:30 AM, Sanford Whiteman
<swhitemanlistens-softw...@cypressintegrated.com> wrote:
>> Right now strtr('anything', 'anything', '') === 'anything', which
>> means that anyone relying on this behavior is doing something strange
>> and dumb imo, doing a function call for nothing.
>
> How  is relying on by-design behavior that turns the call into a no-op
> (instead  of  wrapping the call in an empty() check or whatever) dumb?
> Is  there  some  performance  hit for entering strtr() that makes this
> true?

Well, all I was saying was that you'd never hardcode such thing, it
could happen with dynamic user input, but in that case you'd have a
string, and not null. Anyway as always with PHP there's probably a
couple guys somewhere in the world that did it in a way that BC will
break for them.

I just think it's awkward to deny this feature for a possible edge
case in which BC would be broken, while in other instances BC is
broken in bigger ways, sometimes by accident, and sometimes in minor
versions too.

Cheers

-- 
Jordi Boggiano
@seldaek :: http://seld.be/

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

Reply via email to