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
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
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
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
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
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
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?"
-- 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?&
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
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 '' ?
>
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
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
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
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
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,"
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
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
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
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
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
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
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
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
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
> 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
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
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
>
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.
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...
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).
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
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
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:
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
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)
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
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
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
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
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
>
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",-
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
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'
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
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
) (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
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
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
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
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,
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
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
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
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
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
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
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
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
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
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
> ...
>
>
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"
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
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
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)
}
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 --
&
.) 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
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
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
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
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.
>
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'
== '
- 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
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
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
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
> >
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
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
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
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
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
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
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
- 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
83 matches
Mail list logo