Re: [PHP-DEV] httpOnly Cookies [tiny enhancement]

2005-06-22 Thread Matt W
Hi, Supporting the httpOnly thing is good, but is a php.ini setting better than another setcookie() parameter? I thought that's how it would be implemented... Well, I guess we can use ini_set(). Matt - Original Message - From: "Jochen Hansper" <[EMAIL PROTECTED]> Sent: Wednesday, Jun

Re: [PHP-DEV] httpOnly Cookies [tiny enhancement]

2005-06-22 Thread Matt W
Hi, I'm sorry, I didn't even see that this is for sessions! :-/ Nevermind... Matt - Original Message - From: "Matt W" <[EMAIL PROTECTED]> Sent: Wednesday, June 22, 2005 7:36 PM Subject: Re: [PHP-DEV] httpOnly Cookies [tiny enhancement] > Hi, > &g

[PHP-DEV] [PATCH] array_fill: Allow an array to specify keys

2006-06-25 Thread Matt W
Hi all, I'm on Windows and haven't tried submitting a patch before, so I JUST now installed WinCvs since I don't think you want just a diff of my local file. I used PHP_5_1 since: 5.1's the "regular" download I started working on; if you use it, I assume this can go in 5.1; and I don't know what t

Re: [PHP-DEV] [PATCH] array_fill: Allow an array to specify keys

2006-07-01 Thread Matt W
Hi all, I didn't receive any feedback about the first patch I sent (against PHP_5_1), but have since realized that I should just use the MAIN branch, is that correct? Will someone then take care of backporting to older versions if needed...? (Also, from looking at http://cvs.php.net it looks lik

Re: [PHP-DEV] [PATCH] array_fill: Allow an array to specify keys

2006-07-05 Thread Matt W
Hi Marcus, Thanks for the info. I'm sending along the patch for 5.2 now, since I didn't know whether to wait until the MAIN patch was agreed to (that's what I got from your message), or if you wanted both first. :-) I didn't realize tests were needed for every function, change, etc. (being new a

[PHP-DEV] Use of "empty character constant?"

2006-07-08 Thread Matt W
Hi all, I'm a C newbie and just started experimenting with the PHP internals a couple weeks ago... A few days ago I noticed assignment/comparison of char variables to '' (nothing between single quotes) in, for example, the is_numeric_string function (zend_operators.h), snprintf.c, spprintf.c, etc

Re: [PHP-DEV] Use of "empty character constant?"

2006-07-08 Thread Matt W
Hi Pierre, Thanks for the reply, but where does that page talk about an EMPTY character constant? I pretty much understand character handling otherwise. :-) Thanks, Matt - Original Message - From: "Pierre" Subject: Re: [PHP-DEV] Use of "empty character constant?"

Re: [PHP-DEV] Use of "empty character constant?"

2006-07-08 Thread Matt W
-- check out 12 lines into the function definition. :-/ Well, thanks for helping me get on the right track to "solving" this. The LXR thing needs fixing I guess. Matt - Original Message - From: "Pierre" Subject: Re: [PHP-DEV] Use of "empty character constant?&

Re: [PHP-DEV] Use of "empty character constant?"

2006-07-08 Thread Matt W
Hi Antony, - Original Message - From: "Antony Dovgal" > On 08.07.2006 14:48, Matt W wrote: > > Hi Pierre, > > > > :-O I was just going to give you an example from zend_operators.h, > > is_numeric_string() and guess what? It's the "c

Re: [PHP-DEV] Use of "empty character constant?"

2006-07-08 Thread Matt W
Hi Antony, - Original Message - From: "Antony Dovgal" > On 08.07.2006 15:10, Matt W wrote: > > Hi Antony, > > > > - Original Message - > > From: "Antony Dovgal" > >> > >> '0' became '' ? >

[PHP-DEV] number_format bug fix

2006-07-10 Thread Matt W
Hi, I was trying to enhance the functionality of number_format() (not finished, as I think I need to ask about changes first :-)), and happened to notice this bug while testing and saw it mentioned in a couple bug reports from almost 2 years ago, but it hasn't been fixed. Bug #29538, and it's als

[PHP-DEV] PHPAPI, globals, and number_format

2006-07-10 Thread Matt W
Hi all, First I'll ask 2 general questions... Not sure if I have the terminology right, but functions that are declared as PHPAPI (meaning, available to shared extensions??) -- or any functions, I guess, but I'm thinking ones used by third-party extensions, etc. -- when can their definition be ch

Re: [PHP-DEV] [PATCH] array_fill: Allow an array to specify keys

2006-07-11 Thread Matt W
Hi Marcus, I'm replying again for clarification about the patch. When you first replied and said it looked OK, you mentioned "once we agree to this," which I assumed meant it could be used/committed. I saw array.c hasn't been changed in CVS (though I don't know when that would happen anyway), so

Re: [PHP-DEV] [PATCH] array_fill: Allow an array to specify keys

2006-07-12 Thread Matt W
n.) After your message, I think I'll proceed with array_fill_keys unless I hear otherwise. OK? And make tests for it and array_fill (since there are none now) and submit a new patch with everything ASAP. Thanks, Matt - Original Message - From: "Andi Gutmans" <[EMAIL P

Re: [PHP-DEV] [PATCH] array_fill: Allow an array to specify keys

2006-07-13 Thread Matt W
Hi Marcus, - Original Message - From: "Marcus Boerger" > Hello Matt, > > Tuesday, July 11, 2006, 10:54:05 AM, you wrote: > > > Hi Marcus, > > > I'm replying again for clarification about the patch. When you first > > replied and said it looked OK, you mentioned "once we agree to this,"

[PHP-DEV] [PATCH] array_fill_keys

2006-07-14 Thread Matt W
Hi, Here's a patch to add the array_fill_keys() function instead of extending array_fill(). I left the bit of cleanup/tweaks I had done to array_fill. Can someone please review and let me know if anything needs changing? I have a feeling something will still be wrong it -- works fine, but with r

Re: [PHP-DEV] [PATCH] array_fill: Allow an array to specify keys

2006-07-15 Thread Matt W
filling loop), other than it being inconsistent with array_fill as far as returning an empty array. Thanks again, Matt P.S. Oh, no big deal, but in the NEWS file, you put "Mathew W" instead of "Matt W" or "Matthew W" (2 t's ;-)). And the W is for Wilmas, but the initial is fine; it doesn't matter to me what's there. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [PATCH] array_fill: Allow an array to specify keys

2006-07-15 Thread Matt W
Hi Marcus, - Original Message - From: "Marcus Boerger" > Hello Matt, > > thanks for the update > > best regards > marcus No problem, but... HEAD looks good now (meaning how you guys want it), but there's an issue with 5.2 -- fill and fill_keys will handle "val" passed by reference d

[PHP-DEV] [PATCH] number_format bug fix (29538)

2006-07-16 Thread Matt W
Hi, Here's patches I mentioned a week ago for bug #29538. I happened to notice it while trying to enhance the functionality of number_format(). It's also mentioned at the end of bug #28228. Where number_format(1234, 2, '', ',') returns 123,400 instead of the expected 1,23400 Happens when dec

Re: [PHP-DEV] Supporting version specific INI files as well as SAPI specific INI files.

2006-07-18 Thread Matt W
Hi Richard, - Original Message - From: "Richard Quadling" > NOTE: I am NOT able to verify this code as I am not yet able to > compile PHP. I'm still learning this, so please accept my apologies > for any syntax errors, bugs. I'm more than willing to fix them! And if > anyone has used MS

[PHP-DEV] [PATCH] number_format enhancements

2006-07-19 Thread Matt W
Hi, There are a couple things I don't like about how number_format() works currently, so I'm hoping the functionality changes this patch provides can be added. :-) First is that when you're working with whole numbers and/or don't want any decimal places, both decimal-related parameters are needed

[PHP-DEV] [v][sf]printf additions (#, E, g, G)

2006-07-20 Thread Matt W
Hi, I've wished there was a *printf() float specifier that wouldn't include trailing zeros/point, as simply converting to string (echo, %s, etc.) can result in scientific notation, which I *don't* want (%g in convert_to_string()). The only other way that would result in what I want is number_form

Re: [PHP-DEV] [v][sf]printf additions (#, E, g, G)

2006-07-21 Thread Matt W
Hi Marcus, - Original Message - From: "Marcus Boerger" Sent: Thursday, July 20, 2006 2:21 PM Subject: Re: [PHP-DEV] [v][sf]printf additions (#, E, g, G) > Hello Matt, > > Thursday, July 20, 2006, 2:20:46 PM, you wrote: > > > Hi, > > > I've wished there was a *printf() float specifier th

[PHP-DEV] [PATCH] array_combine is not binary-key safe

2006-07-21 Thread Matt W
Hi, I don't know if array_combine() was intentionally made binary-key unsafe, but it seems wrong and inconsistent since binary keys work everywhere else I can think of -- including array_flip() and the new array_fill_keys(). And updating it is a bit of an optimization by eliminating strlen() call

Re: [PHP-DEV] [PATCH] array_combine is not binary-key safe

2006-07-21 Thread Matt W
> There are 46 uses of add_assoc_zval() in the CVS. Many are with fixed > length strings for the key. Should the others all be using > add_assoc_zval_ex() ? > > On 21/07/06, Matt W <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I don't know if array_comb

Re: [PHP-DEV] [v][sf]printf additions (#, E, g, G)

2006-07-22 Thread Matt W
Hi Marcus, Cool, thanks. I didn't start modifying it yet, but will soon. Matt - Original Message - From: "Marcus Boerger" Sent: Friday, July 21, 2006 > Hello Matt, > > sounds good then, keep going. > > best regards > marcus > > Friday, July 21, 2006, 10:08:19 AM, you wrote: > > > Hi

Re: [PHP-DEV] [PATCH] array_combine is not binary-key safe

2006-07-22 Thread Matt W
other patch you're talking about below... I think Richard Quadling said he'll do it. - Original Message - From: "Andrei Zmievski" Sent: Friday, July 21, 2006 > Yeah, that's probably a good idea. You can submit a patch if you > want. :) > > -Andrei >

Re: [PHP-DEV] [PATCH] number_format enhancements

2006-07-22 Thread Matt W
ber_format.phpt Thanks, Matt - Original Message - From: "Matt W" Sent: Wednesday, July 19, 2006 > Hi, > > There are a couple things I don't like about how number_format() works > currently, so I'm hoping the functionality changes this patch provides can > be added.

[PHP-DEV] Optimizing add_assoc_* with static keys (WAS: Re: [PHP-DEV] [PATCH] array_combine is not binary-key safe)

2006-07-22 Thread Matt W
Hi Richard, Replacement script made it pretty simple I guess. :-) But sizeof("key")+1 should just be sizeof("key") (which == strlen("key")+1). Are there any uses of add_u_assoc_* with hard-coded keys? These changes make things look a little messy, you think? The string is in 2 places, etc...

Re: [PHP-DEV] Optimizing add_assoc_* with static keys (WAS: Re: [PHP-DEV] [PATCH] array_combine is not binary-key safe)

2006-07-23 Thread Matt W
t here... :-) Matt - Original Message - From: "Matt W" Sent: Saturday, July 22, 2006 > Hi Richard, > > Replacement script made it pretty simple I guess. :-) But sizeof("key")+1 > should just be sizeof("key") (which == strlen("key")+1).

Re: [PHP-DEV] [v][sf]printf additions (#, E, g, G)

2006-07-23 Thread Matt W
Hi Gwynne, - Original Message - From: "Gwynne" Sent: Saturday, July 22, 2006 > On Jul 20, 2006, at 3:21 PM, Marcus Boerger wrote: > >> I've wished there was a *printf() float specifier that wouldn't > >> include > >> trailing zeros/point, as simply converting to string (echo, %s, > >> e

Re: [PHP-DEV] [PATCH] number_format enhancements

2006-07-23 Thread Matt W
Hi, - Original Message - From: "bertrand Gugger" Sent: Saturday, July 22, 2006 > Bonsoir Matt, > Matt W wrote: > > Hi, > > > > Haven't heard any opinions on these functionality changes... (Though I know > > more significant things kee

Re: [PHP-DEV] [PATCH] array_combine is not binary-key safe

2006-07-24 Thread Matt W
Hi, - Original Message - From: "bertrand Gugger" Sent: Monday, July 24, 2006 > Matt W wrote: > > Hi Andrei, > > > > I see you applied my patch. > Testing with a php5.2-200607222030 snaps having > /* $Id: array.c,v 1.308.2.21.2.7 2006/07/22 16:58:

Re: [PHP-DEV] [v][sf]printf additions (#, E, g, G)

2006-07-24 Thread Matt W
Hi Gwynne, - Original Message - From: "Gwynne" Sent: Sunday, July 23, 2006 > On Jul 23, 2006, at 5:38 AM, Matt W wrote: > >> While we're on the subject, one of my favorite personal patches to > >> PHP is one that adds the %n specifier. The param

Re: [PHP-DEV] [PATCH] number_format enhancements

2006-07-24 Thread Matt W
Hi bertrand, - Original Message - From: "bertrand Gugger" Sent: Sunday, July 23, 2006 > Matt W wrote: > > Hi, > >>Give some basic userland examples about what you propose to change, > >>please ... > >>(I guess these are a part of the .phpt)

[PHP-DEV] memory_get_usage with new Memory Manager

2006-07-24 Thread Matt W
Hi, After looking through the new Memory Manager code, I assumed this would be the case... (and just now got to test). Since heap->size is only updated when a 256K or whatever block is *actually* allocated/freed, the number returned by memory_get_usage() will only be a multiple of that. That doe

Re: [PHP-DEV] memory_get_usage with new Memory Manager

2006-07-25 Thread Matt W
Hi, That's what I was thinking too, Ron. Internally, the functions zend_memory_[peak_]usage() would also get a flag parameter, or separate functions... There's also the small issue of which size to set Apache's mod_php_mem_usage to. Dmitry, et al., I don't know the details of how the Memory Man

[PHP-DEV] dec*(), *dec(), base_convert() and negative numbers

2006-07-26 Thread Matt W
Hi all, I was just updating the dec[bin|hex|oct] functions to convert numbers >= 2^32 since the [bin|hex|oct]dec counterparts were updated way back in PHP 4.1. My question is if negative numbers should be handled any differently. Now negative longs are converted to unsigned which gives a weird r

Re: [PHP-DEV] memory_get_usage with new Memory Manager

2006-07-27 Thread Matt W
Hi Dmitry, Ilia, et al., Ilia, the Memory Manager is checking the *real* size against memory_limit, so it's still "more accurate" even after the functions were changed to report more like the old way. I still wonder how much difference there may be between size and real_size as it gets close to t

Re: [PHP-DEV] dec*(), *dec(), base_convert() and negative numbers

2006-07-27 Thread Matt W
y simple guidance! Matt - Original Message - From: "Matt W" Sent: Wednesday, July 26, 2006 > Hi all, > > I was just updating the dec[bin|hex|oct] functions to convert numbers >= > 2^32 since the [bin|hex|oct]dec counterparts were updated way back in PHP >

Re: [PHP-DEV] dec*(), *dec(), base_convert() and negative numbers

2006-07-27 Thread Matt W
Hi Michael, - Original Message - From: "Michael Wallner" > Matt W wrote: > > Hi again, > > > [...] > > I don't see what you're trying to fix. > > $ cli -r 'var_dump((int)hexdec(dechex(-123)), (int)(float)sprintf("%u",-

Re: [PHP-DEV] memory_get_usage with new Memory Manager

2006-07-27 Thread Matt W
Hi Dmitry, Thanks for the reply. :-) To the others mentioning the overhead and "slowness" of keeping track of the memory size, I can't believe that, relative to ALL the other work being done in emalloc()? I was going to try a loop of emalloc() and efree() with and without memory-limit just to se

Re: [PHP-DEV] dec*(), *dec(), base_convert() and negative numbers

2006-07-27 Thread Matt W
Hi Michael, - Original Message - From: "Michael Wallner" Sent: Thursday, July 27, 2006 > Matt W wrote: > > > That's why I'm assuming negative numbers aren't "really" supported > > now (not in any form with base_convert()), but it'

[PHP-DEV] array_merge[_recursive] is not binary-key safe (patch)

2006-07-27 Thread Matt W
Hi, Happened to notice this. Only in 5.2. Thanks, MattIndex: ext/standard/array.c === RCS file: /repository/php-src/ext/standard/array.c,v retrieving revision 1.308.2.21.2.8 diff -u -r1.308.2.21.2.8 array.c --- ext/standard/array.c

Re: [PHP-DEV] memory_get_usage with new Memory Manager

2006-07-28 Thread Matt W
Hi Derick, He's referring to Andi's suggestion of having a slow function calculate mem usage only when requested. Wouldn't work for peak, of course. Matt - Original Message - From: "Derick Rethans" Sent: Friday, July 28, 2006 > On Fri, 28 Jul 2006, Dmitry Stogov wrote: > > > Good ide

Re: [PHP-DEV] dec*(), *dec(), base_convert() and negative numbers

2006-07-28 Thread Matt W
) (absolute value), and vice-versa. BTW, can base_convert() simply return an actual number instead of a string when tobase=10? Again, to be the same as *dec() and avoid conversion to string if it's just going to be used in numeric context. Matt - Original Message - From: "Michael

Re: [PHP-DEV] memory_get_usage with new Memory Manager

2006-07-28 Thread Matt W
Hi Richard, Andi probably stole the idea. ;-P No, I had kinda wondered the same thing... Not about counting memory only when requested, but if there was a fairly quick/simple way for the slack space to be calculated (to get the emalloc()'d size from the real size) without having another variable

Re: [PHP-DEV] memory_get_usage with new Memory Manager

2006-07-28 Thread Matt W
Hi all, For my own curiosity regarding the overhead with memory-limit or keeping track of usage so memory_get_[peak_]usage() can always be enabled, I just did some quick testing. Using this code PHP_FUNCTION(emalloc_tester) { int i; long mem_size; void *ptr; if (zend_parse_param

Re: [PHP-DEV] memory_get_usage with new Memory Manager

2006-07-28 Thread Matt W
Hi Dmitry, No, there's always more work going on (with --enable-memory-limit) with every emalloc() call to update the size even when real_size isn't updated, right? Meaning heap->size += true_size; if (heap->peak < heap->size) { heap->peak = heap->size; } at the end of _zend_mm_alloc_int

Re: [PHP-DEV] memory_get_usage with new Memory Manager

2006-07-28 Thread Matt W
Hi Andi, Dmitry, Andi, yeah, I understand what you're saying... however, in my tests on Windows at least, it was consistently faster *with* --enable-memory-limit at the small sizes, which are used the majority of the time, right? I don't understand *how* it was, with more variables being updated,

Re: [PHP-DEV] dec*(), *dec(), base_convert() and negative numbers

2006-07-29 Thread Matt W
sume. 2) CAN base_convert() be changed to return an actual number instead of a string if tobase=10? Seems a waste to convert a base 10 result to string like now... :-? Thanks! Matt - Original Message - From: "Matt W" Sent: Friday, July 28, 2006 > Hi, > > More thoughts... &g

[PHP-DEV] zend_u_strtod is slow - possible fix

2006-07-31 Thread Matt W
Hi all, As I was working on upgrading the dec[bin|hex|oct] functions to convert large doubles, I noticed how much slower things were when converting Unicode strings to double. I found that converting the whole thing to string and using regular zend_strtod() was much faster. Then I decided to try

Re: [PHP-DEV] zend_u_strtod is slow - possible fix

2006-08-02 Thread Matt W
ng to double > conversion is about 100% slower than from binary strings. If this is > acceptable we can commit the patch. Otherwise, we should port > zend_strtod() to deal with unicode strings directly. > > -Andrei > > On Jul 31, 2006, at 1:58 AM, Matt W wrote: > > > Hi

[PHP-DEV] is_numeric_string and general string-to-number conversion

2006-08-02 Thread Matt W
Hi there, I've been looking at the different string->number related functions lately. It looks like is_numeric_[string|unicode]() could be optimized. Here's what I was thinking: Can functions like zend_[string|unicode]_to_number() be added? Then is_numeric_* could always call only 1 function tha

Re: [PHP-DEV] [v][sf]printf additions (#, E, g, G)

2006-08-03 Thread Matt W
Hi Marcus, all, I finally started on these additions and noticed a couple things... 1) Using %.4e, for example, only gives 3 decimal places instead of 4 -- I assume I can/should fix that? 2) I realized "precision" isn't supported with d/u/o/x etc., just width+padding. Precision could be used fo

[PHP-DEV] [PATCH] MAX_LENGTH_OF_LONG, and possible buffer overflows

2006-08-04 Thread Matt W
Hi there, OK, so overflows aren't very likely with MAX_LENGTH_OF_LONG set to 20, but I found 3 places I think you'll want to change. :-) Also, can MAX_LENGTH_OF_LONG be changed to be accurate on 32-bit platforms? Is setting it to (sizeof(long) > 4 ? 20 : 11) acceptable? If MAX_LENGTH_OF_LONG is

[PHP-DEV] is_numeric_string causes function inconsistency

2006-08-06 Thread Matt W
Hi all, Since I've been looking at is_numeric_[string|unicode], I found a weird thing it causes; probably doesn't make sense to users; bug? Look: abs(-1e500) // float(INF) abs('-1e500') // int(1) WRONG abs('-1e100') // float(1.0E+100) is_finite(1e500) // bool(false) is_finite('1e500') // bool(t

[PHP-DEV] [PATCH] *printf additions (#, g, G), updates, etc.

2006-08-10 Thread Matt W
Hi all, Here are patches to add the things to *printf() I asked about a few weeks ago. If people can look over it, test it more, commit it, whatever, that'd be great. :-) Sorry for the long message, but want to cover everything. *) Precision now works for integer type specifiers (inc. x/o/b), m

Re: [PHP-DEV] is_numeric_string causes function inconsistency

2006-08-11 Thread Matt W
works on a 32-bit system. If that last one can be changed, it also should be in the language parser of course (you know, for $n = 0xFF;). Thanks, Matt - Original Message - From: "Matt W" Sent: Sunday, August 06, 2006 > Hi all, > > Since I've been looking

Re: [PHP-DEV] is_numeric_string causes function inconsistency

2006-08-11 Thread Matt W
ke a patch? Oh, and something I just thought of looking at the code -- you think the function could/should also count IS_DOUBLE values? After converting to string, of course. :-) Thanks, Matt - Original Message - From: "Matt W" Sent: Sunday, August 06, 2006 > ... > >

Re: [PHP-DEV] is_numeric_string causes function inconsistency

2006-08-11 Thread Matt W
Hello Pierre, Thanks for your reply. :-) - Original Message - From: "Pierre" Sent: Friday, August 11, 2006 > Hello, > > Note that I also answer your previous mail here :) > > On Fri, 11 Aug 2006 06:18:13 -0500 > [EMAIL PROTECTED] ("Matt W"

[PHP-DEV] Re: [Simplistic End User View] Re: [PHP-DEV] is_numeric_string causes function inconsistency

2006-08-11 Thread Matt W
Hi Jochem, Leading whitespace is already allowed with PHP's is_numeric() function (and corresponding internal one), math operations, etc. Only when it precedes .123 or -.123 does the behavior change. :-) Matt - Original Message - From: "Jochem Maas" Sent: Friday, August 11, 2006 Pie

Re: [PHP-DEV] is_numeric_string causes function inconsistency

2006-08-12 Thread Matt W
Hi Pierre, I will reply to the rest of your message later. Just wanted to quickly point out another thing I found with is_numeric_string() when the allow_errors param==0 (which is_numeric() PHP function uses) and there is *trailing* whitespace: is_numeric('1 ') // bool(false) Again, easy to fi

[PHP-DEV] [PATCH] array_count_values bug: mishandling of numbers with leading whitespace

2006-08-13 Thread Matt W
Hi there, I didn't know whether to make an official bug report or send to the list -- so I'm trying this first. :-) var_dump(array_count_values(array(' 001', 1, ' 1 ', '1'))); Expected result (and what PHP 4 gives): array(3) { [" 001"]=> int(1) [1]=> int(2) [" 1 "]=> int(1) }

Re: [PHP-DEV] [PATCH] array_count_values bug: mishandling of numbers with leading whitespace

2006-08-13 Thread Matt W
Hi Pierre, - Original Message - From: "Pierre" Sent: Sunday, August 13, 2006 > Hello, > > On 8/13/06, Matt W <[EMAIL PROTECTED]> wrote: > > Hi there, > > > > I didn't know whether to make an official bug report or send to the list -- &

Re: [PHP-DEV] [PATCH] array_count_values bug: mishandling of numbers with leading whitespace

2006-08-14 Thread Matt W
.) Have to see now that it's Monday... More below. - Original Message - From: "Pierre" Sent: Sunday, August 13, 2006 > Hi, > > On 8/13/06, Matt W <[EMAIL PROTECTED]> wrote: > > > Not reasonable or safe? Then why were the other bugs fixed instead o

Re: [PHP-DEV] [PATCH] array_count_values bug: mishandling of numbers with leading whitespace

2006-08-15 Thread Matt W
Hi Pierre, I will go ahead and enter a Bug report for this in a bit ('cause there's definitely a bug), just so it's in the official place (preferred, I guess?) and doesn't keep going here on the list. :-) - Original Message - From: "Pierre" Sent: Monday, August 14, 2006 > Hello, > > > W

Re: [PHP-DEV] [PATCH] array_count_values bug: mishandling of numbers with leading whitespace

2006-08-15 Thread Matt W
Hi Stefan, - Original Message - From: "Stefan Walk" Sent: Tuesday, August 15, 2006 > BC has already been broken Yes, and forget BC, it's a bug. > and while BC breaks are OK in major > version changes (4 -> 5) OK, but 1) this wasn't intentionally changed, and 2) it wasn't in a major ve

Re: [PHP-DEV] [PATCH] array_count_values bug: mishandling of numbers with leading whitespace

2006-08-16 Thread Matt W
Hi Pierre, - Original Message - From: "Pierre" Sent: Tuesday, August 15, 2006 > Hello, > > On 8/15/06, Matt W wrote: > > Hi Pierre, > > > > I will go ahead and enter a Bug report for this in a bit ('cause there's > > definitely a b

Re: [PHP-DEV] [PATCH] array_count_values bug: mishandling of numbers with leading whitespace

2006-08-16 Thread Matt W
Hi Pierre, - Original Message - From: "Pierre" Sent: Wednesday, August 16, 2006 > Hello Matt, > > > > Which part of "We need to sit down and come up with a proposal?" did > > > you not understand? seriously? > > > > Nothing. :-) But the patch is all I know of, so that was my proposal. >

Re: [PHP-DEV] is_numeric_string causes function inconsistency

2006-08-16 Thread Matt W
Hi Pierre, After checking places where is_numeric... functions are used (http://lxr.php.net/ident?i=is_numeric_string), it looks like changing to allow *trailing* spaces would have an impact in zend_operators.c for at least compare_function() (and I guess increment_function() too). e.g. ('1' == '

Re: [PHP-DEV] increase the default memory limit in 5.2.0+

2006-08-16 Thread Matt W
- Original Message - From: "Stefan Esser" Sent: Wednesday, August 16, 2006 > Hello, > > After having tested 5.2 and the new memory manager for a couple of > > weeks, I notice a significant increase of the reported memory usage. As > > a side effect, many applications reach the 8M memory l

Re: [PHP-DEV] [PATCH] array_count_values bug: mishandling of numbers with leading whitespace

2006-09-12 Thread Matt W
cus put my name... ;-) Thanks, Matt - Original Message ----- From: "Matt W" Sent: Sunday, August 13, 2006 > [...] > > http://realplain.com/php/array_count_values_bug.diff > http://realplain.com/php/array_count_values_bug_5_2.diff -- PHP Internals - PHP Runtime Development Mai

[PHP-DEV] [PATCH] Error message cleanup

2006-09-25 Thread Matt W
Hi, Don't know if someone wants to check this out and apply it before 5.2's release, or whether you want it at all. ;-) I just noticed how many of the php_error_docref()'s still have a period (".") at the end of the text, resulting in "... error message. in on line " Looks better/consistent wit

Re: [PHP-DEV] [PATCH] Error message cleanup

2006-09-25 Thread Matt W
Hi Richard, - Original Message - From: "Richard Quadling" Sent: Monday, September 25, 2006 > On 25/09/06, Matt W <[EMAIL PROTECTED]> wrote: > > [...] > > > > I don't know if my regex search found all occurrences, but I fixed up the > >

[PHP-DEV] [PATCH] Small typo in zend_u_strtol

2006-09-25 Thread Matt W
Hi, Noticed this a couple months ago and never sent this simple thing. :-) ERANGE is being triggered too soon because of the wrong variable, which causes the following (in Unicode mode, of course) on 32-bit: (int) '2147483640' // int(2147483647) '2147483640' + 0) // float(2147483640) Instead of

[PHP-DEV] array/HashTable filling optimization

2006-09-27 Thread Matt W
Hi all, I noticed awhile ago how most every use of zend[_u]_hash_init has nSize as 0. Of course it isn't always known how many elements will be added to the array (nTableSize), but there are places where an accurate value could be used instead of getting the minimum default (8). For anyone who d

Re: [PHP-DEV] [PATCH] Error message cleanup

2006-10-05 Thread Matt W
riginal Message ----- From: "Matt W" Sent: Monday, September 25, 2006 > Hi, > > Don't know if someone wants to check this out and apply it before 5.2's > release, or whether you want it at all. ;-) I just noticed how many of the > php_error_docref()'s still

Re: [PHP-DEV] [PATCH] Small typo in zend_u_strtol

2006-10-05 Thread Matt W
Hi, Was this missed? I'm sure you want to fix it. :-) Maybe should've put "bug" instead of "typo" in the subject... Just also sending to you Andrei since it's Unicode related. Patch was an attachment: http://news.php.net/php.internals/25820 - Origina

Re: [PHP-DEV] [PATCH] Small typo in zend_u_strtol

2006-10-05 Thread Matt W
ast. :-) Do you see the problem in the examples I gave? Numbers between 2147483640 and 2147483647 incorrectly set ERANGE, along with similar negative values. > -Andrei Matt > On Oct 5, 2006, at 1:50 AM, Matt W wrote: > > > Hi, > > > > Was this missed? I

[PHP-DEV] [PATCH] Possible parse error...

2006-10-18 Thread Matt W
Hi, Probably not much chance of this happening, but while looking through HEAD's lexer/parser code (which word is correct? :-)), I noticed that there's no rule to match a backslash followed by a \n newline inside single quotes, resulting in "Unexpected character in input ..." The ST_SINGLE_QUOTE

[PHP-DEV] Memory needed for arrays? And major performance problems filling an array

2004-12-09 Thread Matt W
Hi all, This is my first time posting to these lists, so I apologize if the internals list is wrong. :-) Before I describe my issue, I had been wondering how I can tell/estimate how much memory PHP will use for arrays? Is there at least a rough formula someone can tell me? My environment: 4.3.6

Re: [PHP-DEV] Memory needed for arrays? And major performance problems filling an array

2004-12-10 Thread Matt W
- Original Message - From: "Derick Rethans" Sent: Thursday, December 09, 2004 > On Thu, 9 Dec 2004, Matt W wrote: > > > Before I describe my issue, I had been wondering how I can tell/estimate > > how much memory PHP will use for arrays? Is there at least a r