[Zeev Suraski [EMAIL PROTECTED]]
Hey,
I just got around to writing a PHP script that uses stat(), and was
quite surprised to find that instead of using string indices, it uses
hardcoded/obscure numeric indices, e.g.:
Array
(
[0] = 2050
[1] = 1114462
[2] = 16877
On 11 May 2001, Stig Sæther Bakken wrote:
Why not have both numerical and descriptive indices? Backwards
compatible, slightly bloatish, but not really a problem.
it's already implemented this way now (it was added last night) AFAIK
Derick Rethans
At 12:18 11/5/2001, Stig Sæther Bakken wrote:
[Zeev Suraski [EMAIL PROTECTED]]
Hey,
I just got around to writing a PHP script that uses stat(), and was
quite surprised to find that instead of using string indices, it uses
hardcoded/obscure numeric indices, e.g.:
Array
(
[0]
[EMAIL PROTECTED]
Sent: Friday, May 11, 2001 10:21 AM
Subject: Re: [PHP-DEV] stat/fstat
[EMAIL PROTECTED] wrote:
On 11 May 2001, Stig Sæther Bakken wrote:
Why not have both numerical and descriptive indices? Backwards
compatible, slightly bloatish, but not really a problem.
it's already
On Fri, 11 May 2001, Jason Greene wrote:
Its actually not that pretty
Since the entries are in a hashtable,
you have to duplicate the values, with just another key.
You could just reuse the same value with refcount++ but that means you
can't use nice add_* functions, gotta use zend_hash_*
Andrei had the same suggestion, so I went ahead and added it last night.
-Jason
- Original Message -
From: Stig Sæther Bakken [EMAIL PROTECTED]
To: Zeev Suraski [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 4:18 AM
Subject: Re: [PHP-DEV] stat/fstat
[Zeev Suraski
On Fri, 11 May 2001, Jason Greene wrote:
Its actually not that pretty
Since the entries are in a hashtable,
you have to duplicate the values, with just another key.
You could just reuse the same value with refcount++ but that means you
can't use nice add_* functions, gotta use
On Fri, 11 May 2001, Jason Greene wrote:
True,
I was lazy though and didn't feel like writing all that additional code,
just to save 13 longs of memory space : )
13 * sizeof(zval) actually.
-Andrei
When we eliminate the impossible, whatever remains,
however improbable, must be true. --
Mailing List [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 11:38 AM
Subject: Re: [PHP-DEV] stat/fstat
On Fri, 11 May 2001, Jason Greene wrote:
True,
I was lazy though and didn't feel like writing all that additional code,
just to save 13 longs of memory space : )
13 * sizeof(zval) actually
At 18:21 11/5/2001, Brian Foddy wrote:
[EMAIL PROTECTED] wrote:
On 11 May 2001, Stig Sæther Bakken wrote:
Why not have both numerical and descriptive indices? Backwards
compatible, slightly bloatish, but not really a problem.
it's already implemented this way now (it was added
Zeev Suraski wrote:
At 18:21 11/5/2001, Brian Foddy wrote:
[EMAIL PROTECTED] wrote:
On 11 May 2001, Stig Sæther Bakken wrote:
Why not have both numerical and descriptive indices? Backwards
compatible, slightly bloatish, but not really a problem.
it's already
At 19:38 11/5/2001, Andrei Zmievski wrote:
On Fri, 11 May 2001, Jason Greene wrote:
True,
I was lazy though and didn't feel like writing all that additional code,
just to save 13 longs of memory space : )
13 * sizeof(zval) actually.
13*(sizeof(zval)+sizeof(zend_mem_header)), and possibly
: [PHP-DEV] stat/fstat
At 19:38 11/5/2001, Andrei Zmievski wrote:
On Fri, 11 May 2001, Jason Greene wrote:
True,
I was lazy though and didn't feel like writing all that additional code,
just to save 13 longs of memory space : )
13 * sizeof(zval) actually.
13*(sizeof(zval)+sizeof
Mailing List
[EMAIL PROTECTED]
Sent: Friday, May 11, 2001 12:36 PM
Subject: Re: [PHP-DEV] stat/fstat
At 19:38 11/5/2001, Andrei Zmievski wrote:
On Fri, 11 May 2001, Jason Greene wrote:
True,
I was lazy though and didn't feel like writing all that additional
code,
just to save 13
At 03:31 AM 5/12/01 +0300, Zeev Suraski wrote:
Yikes. We were only kidding, Jason :)
Well, he could have the last argument of zend_hash_update() to receive the
point to inserted value and done refcount++ on that and inserted again. ;-)
I've been thinking we need to have add_* functions
: Friday, May 11, 2001 12:36 PM
Subject: Re: [PHP-DEV] stat/fstat
At 19:38 11/5/2001, Andrei Zmievski wrote:
On Fri, 11 May 2001, Jason Greene wrote:
True,
I was lazy though and didn't feel like writing all that additional
code,
just to save 13 longs of memory space : )
13
At 03:31 AM 5/12/01 +0300, Zeev Suraski wrote:
Yikes. We were only kidding, Jason :)
Well, he could have the last argument of zend_hash_update() to receive the
point to inserted value and done refcount++ on that and inserted again. ;-)
The only thing with that method is that I was trying
I just figured this only applies to stat() and not fstat(). Which also
means they're totally incompatible with each other, although the
documentation suggests they're essentially the same, other than the fact
that one expects a file handle and the other expects a file name... What
gives?
PM
Subject: Re: [PHP-DEV] stat/fstat
I just figured this only applies to stat() and not fstat(). Which also
means they're totally incompatible with each other, although the
documentation suggests they're essentially the same, other than the fact
that one expects a file handle
19 matches
Mail list logo