On 07/16/2012 10:29 AM, Paul Dragoonis wrote: > Thanks for the comments guys, I like your idea about skipping the > by-ref count parameter. > > If the 'default' keyword were to be added in, then you could skip the > 4th parameter and add your 5th 'limit' option. > > $str = str_replace($search, $replace, $subject, default, 5); > > Does anyone have any objections on this implementation approach? > (obviously we'd have to wait for the default param skipping to be > implemented, I'm not sure on the implementation status of that > feature)
I'm not seeing what's the problem with it being a by-ref variable, as you've mentioned it twice now. Are you bothered by an additional variable being set in memory when skipping (i.e. not using it)? Or am I reading more into it than you tried to say? :) Greetings, Florian -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php