On Mon, Aug 15, 2011 at 10:20 AM, Lester Caine wrote:
> Perhaps it should be linked in the SeeAlso from strncmp and the rest?
I added substr_compare to the See Also sections of strcmp, strcasecmp,
strncmp and strncasecmp.
Apart from that: Now that we know that a function for doing such
comparison
Laruence wrote:
> I think we are not talking about how to accomplish a function, we
> are talking about how to do it better
>
> and, in fact, I think strrev is need more cpu time and alloc space,
> although they are very tiny :)
I very much doubt it's ever going to be a bottleneck (and I thi
Hi Rasmus:
could we well docuemnt this(changelog) to avoding such bad thing happen?
and sure, I agree and know what you are worried, also I am very
respect you .
so here is the thing, if I can't get your support, I think I
should darw back the proposal.
thanks
2011/8/15 Rasmus Lerd
Laruence wrote:
I totally agree with you about bc break things,
but actully I don't think this proposal will bring a big bc break,
it's a new approach , but not a big change,
I am meaning that the old codes can work fine because rarely codes
depends on a negative length.
do you
On 08/15/2011 01:51 AM, Laruence wrote:
> Hi Lester:
>I totally agree with you about bc break things,
>
>but actully I don't think this proposal will bring a big bc break,
> it's a new approach , but not a big change,
>
>I am meaning that the old codes can work fine because rarely cod
Hi Lester:
I totally agree with you about bc break things,
but actully I don't think this proposal will bring a big bc break,
it's a new approach , but not a big change,
I am meaning that the old codes can work fine because rarely codes
depends on a negative length.
do you agree?
th
Hi!
On 8/15/11 1:20 AM, Lester Caine wrote:
probably part of unicode compatibility, and in that vane, would it be possible
to create a 'namespace' version of string functions which could be a little more
consistent, and also offer the chance to switch to full unicode comparison if
required? sb::
Laruence wrote:
yes, substr_compare can do it, and it also supports negative
length argument too.
I am with Rasmus ... while the BC problem he is pointing out is probably very
rare, those are the worse ones to fix when they pop up intermittently, and
usually when 10 year old code has bee
Hi:
I think we are not talking about how to accomplish a function, we
are talking about how to do it better
and, in fact, I think strrev is need more cpu time and alloc space,
although they are very tiny :)
thanks
2011/8/15 Sebastian Krebs :
>
>
> Am 14.08.2011 23:52, schrieb Rasmus Lerdor
Hi Tjerk:
yes, substr_compare can do it, and it also supports negative
length argument too.
but I am proposal to improve strn(case)cmp, so they are not conflict . :)
thanks
2011/8/15 Tjerk Anne Meesters :
> Hi,
>
> Doesn't substr_compare() accomplish the same thing since 5.1.0?
>
> The o
Am 14.08.2011 23:52, schrieb Rasmus Lerdorf:
On 08/14/2011 02:37 PM, Rasmus Lerdorf wrote:
On 08/14/2011 02:03 PM, Stas Malyshev wrote:
Hi!
On 8/14/11 11:40 AM, Rasmus Lerdorf wrote:
My main issue with changing strncmp/strncasecmp is that these are
currently exact mappings of the underlying
Hi,
Doesn't substr_compare() accomplish the same thing since 5.1.0?
The only thing I couldn't figure out is how to make it case
insensitive without specifying an explicit value to $length
Best,
Tjerk
On Mon, Aug 15, 2011 at 11:18 AM, Laruence wrote:
> Hi:
> compare to use substr, strncm
Hi:
compare to use substr, strncmp supporting negative lenght can
save a temp variable.
thanks
2011/8/15 Rasmus Lerdorf :
> On 08/14/2011 02:37 PM, Rasmus Lerdorf wrote:
>> On 08/14/2011 02:03 PM, Stas Malyshev wrote:
>>> Hi!
>>>
>>> On 8/14/11 11:40 AM, Rasmus Lerdorf wrote:
My main is
On 08/14/2011 02:37 PM, Rasmus Lerdorf wrote:
> On 08/14/2011 02:03 PM, Stas Malyshev wrote:
>> Hi!
>>
>> On 8/14/11 11:40 AM, Rasmus Lerdorf wrote:
>>> My main issue with changing strncmp/strncasecmp is that these are
>>> currently exact mappings of the underlying libc functions. For people
>>
>>
On 08/14/2011 02:03 PM, Stas Malyshev wrote:
> Hi!
>
> On 8/14/11 11:40 AM, Rasmus Lerdorf wrote:
>> My main issue with changing strncmp/strncasecmp is that these are
>> currently exact mappings of the underlying libc functions. For people
>
> And why should anybody care? 99% of people using PHP
Hi!
On 8/14/11 11:40 AM, Rasmus Lerdorf wrote:
My main issue with changing strncmp/strncasecmp is that these are
currently exact mappings of the underlying libc functions. For people
And why should anybody care? 99% of people using PHP never used a libc
function and can hardly tell libc from
On 08/14/2011 11:26 AM, Stas Malyshev wrote:
> Hi!
>
>>> Maybe, but I would classify *that* as a bug as it makes no sense at all.
>
> Thinking more about it, something like:
>
> if(strncasecmp($filename, ".php", -4) === 0) {
> /* got php file! */
> }
>
> seems to me just fine and better than
Hi!
On 8/13/11 5:17 AM, Laruence wrote:
Dear all:
I am going to close strn(case)cmp supporting negative length vote,
since it has been calling for vote near two weeks, and no new feedback
I think we need some more time to discuss it. Give it a week, then let's
see.
--
Stanislav Malyshev
Hi!
Maybe, but I would classify *that* as a bug as it makes no sense at all.
Thinking more about it, something like:
if(strncasecmp($filename, ".php", -4) === 0) {
/* got php file! */
}
seems to me just fine and better than doing the same with substr. I
would definitely be against the war
Hi!
imo the patch is consistent with how substr works:
tyrael@thor:~$ php -d display_errors=1 -d error_reporting=-1 -r 'echo
substr("prefix_num", -100);'
prefix_num
Maybe, but I would classify *that* as a bug as it makes no sense at all.
It makes some sense, if you take the meaning of argume
Hi:
sorry, the example is wrong , it should be :
thanks
2011/8/14 Laruence :
> Hi all internalers:
> Since there comes some new objections, I think I should open the
> RFC voteing again.
>
> to Derick, if I extended voting phase for two weeks , can we
> consider this voteing va
Hi all internalers:
Since there comes some new objections, I think I should open the
RFC voteing again.
to Derick, if I extended voting phase for two weeks , can we
consider this voteing valid?
I think this proposal is not explained clearly before, so I am
going to explain it agia
Hi:
I think what I was done is try to describe a image, that we can make
follow codes more simple:
if (strncmp(substr("num_suffix", 0, -5), "suffix", 5) == 0) {
echo "they have the same suffix";
}
yes, there is must something not good in my patch, but I think I
can tweak it as
Hi:
this just to say that stncasecmp has the same behavior of either
negative or postive length argument.
why you insist to this point? as strncmp("", "bbb", 100)
works with no warning, why negative length need trigger warnings?
thanks
2011/8/14 Derick Rethans :
> On Sun, 14 Aug
>> imo the patch is consistent with how substr works:
>> tyrael@thor:~$ php -d display_errors=1 -d error_reporting=-1 -r 'echo
>> substr("prefix_num", -100);'
>> prefix_num
>
> Maybe, but I would classify *that* as a bug as it makes no sense at all.
>
I don't mind that, and imho laruence would be
On Sun, 14 Aug 2011, Ferenc Kovacs wrote:
> On Sun, Aug 14, 2011 at 1:24 PM, Derick Rethans wrote:
> > On Sat, 13 Aug 2011, Laruence wrote:
> >
> >> Dear all:
> >> I am going to close strn(case)cmp supporting negative length vote,
> >> since it has been calling for vote near two weeks, and no
On Sun, Aug 14, 2011 at 1:24 PM, Derick Rethans wrote:
> On Sat, 13 Aug 2011, Laruence wrote:
>
>> Dear all:
>> I am going to close strn(case)cmp supporting negative length vote,
>> since it has been calling for vote near two weeks, and no new feedback
>> .
>>
>> the Voting result is:
>>
On Sat, 13 Aug 2011, Laruence wrote:
> Dear all:
> I am going to close strn(case)cmp supporting negative length vote,
> since it has been calling for vote near two weeks, and no new feedback
> .
>
> the Voting result is:
> Support : 6 felipe pajoye pierrick gwynne tyrael laruence
>
Dear all:
I am going to close strn(case)cmp supporting negative length vote,
since it has been calling for vote near two weeks, and no new feedback
.
the Voting result is:
Support : 6 felipe pajoye pierrick gwynne tyrael laruence
Decline : 3 iliaa rasmus salathe
it wins
HI:
and I don't think this was diffcult to accepted
it was a little improve, and make a litte change, even no bc break...
thanks
2011/8/6 Laruence :
> Hi:
> I am not good at english, so I could not explain the idea very clearly
> but I really think it was a good idea,,
>
> could someone
Hi:
I am not good at english, so I could not explain the idea very clearly
but I really think it was a good idea,,
could someone plz make a decision that make this patch applied to svn trunk?
thanks
2011/8/2 Jan Dolecek :
> This would make perfect sense with constant strings and constant
> l
This would make perfect sense with constant strings and constant
length, when using variables this may lead to some magic bugs, which
would be normally reported as E_WARNING. Not sure if it's a good idea
:(
Jan Dolecek
juzna...@gmail.com
On Mon, Aug 1, 2011 at 7:40 AM, Laruence wrote:
> Hi eve
Hi everyone:
plz vote for this : "strn(case)cmp supporting a negative length as
its third paramter"
RFC: https://wiki.php.net/rfc/strncmpnegativelen#vote
if you have any objection, plz write back.
thanks
--
Laruence Xinchen Hui
http://www.laruence.com/
--
PHP Internals - PHP Runtim
33 matches
Mail list logo