Re: [PHP-DEV] Calling PHP functions from an extension

2004-07-23 Thread Lester Caine
Andi Gutmans wrote: Check out zend_call_function(). It allows you to cache the function lookup in the fci_cache parameter. Where is the best place to find zend_call_function details, nothing in the manual and google gives some spurious results. -- Lester Caine - L.S.C

Re: [PHP-DEV] Calling PHP functions from an extension

2004-07-23 Thread Wez Furlong
Use the source, Luke. On Fri, 23 Jul 2004 08:08:00 +0100, Lester Caine <[EMAIL PROTECTED]> wrote: > Andi Gutmans wrote: > > > Check out zend_call_function(). It allows you to cache the function > > lookup in the fci_cache parameter. > > Where is the best place to find zend_call_function details,

Re: [PHP-DEV] make cli problems

2004-07-23 Thread Wez Furlong
cvs -dP up ./buildconf ./configure On Fri, 23 Jul 2004 05:36:25 +, Curt Zirzow <[EMAIL PROTECTED]> wrote: > > > I hope I'm doing something wrong, I'm issuing this: > > cvs -dP update > make clean > ./configure --with-zlib --and-other-options > make cli > > My result when linking occ

[PHP-DEV] fp, rounding, decimal arithmetic - definitive account?

2004-07-23 Thread George Whiffen
For the record, herewith: - definitive (?) list of php's fp/rounding/arithmetic issues - analysis of the issues - discussion of options for handling the issues - description of a comprehensive and "painless" solution - links to and discussion of proof-of-concept C code Apologies for the length of t

Re: [PHP-DEV] make cli problems

2004-07-23 Thread Jani Taskinen
# cvs -dPA # ./cvsclean # ./buildconf # ./configure ... Better choice: Use the snapshots.. --Jani On Fri, 23 Jul 2004, Wez Furlong wrote: >cvs -dP up >./buildconf >./configure > >On Fri, 23 Jul 2004 05:36:25 +, Curt Zirzow <[EMAIL PROTECTED]> wrote: >> >> >>

Re: [PHP-DEV] Calling PHP functions from an extension

2004-07-23 Thread Andrey Hristov
You can find some usage of this function in ext/standard/array.c hth, andrey Quoting Lester Caine <[EMAIL PROTECTED]>: > Andi Gutmans wrote: > > > Check out zend_call_function(). It allows you to cache the function > > lookup in the fci_cache parameter. > > Where is the best place to find zend_c

Re: [PHP-DEV] Calling PHP functions from an extension

2004-07-23 Thread Lester Caine
Andrey Hristov wrote: You can find some usage of this function in ext/standard/array.c Where is the best place to find zend_call_function details, nothing in the manual and google gives some spurious results. Ta - but I'll leave this to John :) It's a level below where I can usefully help at the m

[PHP-DEV] Re: fp, rounding, decimal arithmetic - definitive account?

2004-07-23 Thread Christian Schneider
George Whiffen wrote: As you either already know or could reasonably guess, my personal view is that simple, consistent, exact decimal arithmetic is highly desirable for any development tool intended for either novices or commercial use. I use BCMath for critical (e.g. money) calculations as I'd

[PHP-DEV] Re: fp, rounding, decimal arithmetic - definitive account?

2004-07-23 Thread George Whiffen
Christian Schneider wrote: George Whiffen wrote: As you either already know or could reasonably guess, my personal view is that simple, consistent, exact decimal arithmetic is highly desirable for any development tool intended for either novices or commercial use. I use BCMath for critical (e.g

[PHP-DEV] Re: fp, rounding, decimal arithmetic - definitive account?

2004-07-23 Thread Christian Schneider
Hey George, My point is: I'm not against improving accuracy of floating point arithmetic in PHP (although it could lead to some weird compatibility problems with older version) but I wouldn't advise people who really, really have to rely on their numbers to be correct to use floats anyway. Geor

[PHP-DEV] Re: fp, rounding, decimal arithmetic - definitive account?

2004-07-23 Thread Christian Schneider
Christian Schneider wrote: I store cent values as integer strings and I possibly have to deal with values bigger than 214 million bucks (where PHP starts to convert ints Errr, that's 21 million bucks where the transition occurs :-) - Chris -- PHP Internals - PHP Runtime Development Mailing List T

[PHP-DEV] [PATCH] two small typos in php.ini.* and mail.c

2004-07-23 Thread Antony Dovgal
Hi all! Two small patches to fix typos in php.ini-dist, php.ini-recommended & mail.c These patches fix bug #29122. --- WBR, Antony Dovgal aka tony2001 [EMAIL PROTECTED] || [EMAIL PROTECTED] Index: ext/standard/mail.c === RCS file: /r

[PHP-DEV] Re: fp, rounding, decimal arithmetic - definitive account?

2004-07-23 Thread George Whiffen
Christian, You are paranoid! You don't need integers AND bc arithmetic! One or the other will do fine. C doubles are exact for integers a million times bigger than your requirements (i.e. over 1e15). That means that all integer calculations are also exact, even if php does store them as floats.

Re: [PHP-DEV] Memory leak

2004-07-23 Thread Andi Gutmans
Why do we need one extra byte? Anyway, the question is if we should return to alloca() or not. I am slightly in favor but don't feel very strongly about it. Andi At 08:44 AM 7/23/2004 +0200, Marcus Boerger wrote: Hello Andi, the easiest way to make the test suit for 5.1 work again is to change ze

Re: [PHP-DEV] Memory leak

2004-07-23 Thread Ilia Alshanetsky
On July 23, 2004 11:42 am, Andi Gutmans wrote: > Why do we need one extra byte? We do not. > Anyway, the question is if we should return to alloca() or not. I am > slightly in favor but don't feel very strongly about it. Perhaps we could try a combination of the two, to ensure that no script is

Re: [PHP-DEV] Calling PHP functions from an extension

2004-07-23 Thread Andi Gutmans
php5/Zend/zend_execute_API.c. It's quite simple. If you can't figure it out yourself, let me know. At 08:08 AM 7/23/2004 +0100, Lester Caine wrote: Andi Gutmans wrote: Check out zend_call_function(). It allows you to cache the function lookup in the fci_cache parameter. Where is the best place to

Re: [PHP-DEV] Memory leak

2004-07-23 Thread Andi Gutmans
At 11:54 AM 7/23/2004 -0400, Ilia Alshanetsky wrote: On July 23, 2004 11:42 am, Andi Gutmans wrote: > Why do we need one extra byte? We do not. > Anyway, the question is if we should return to alloca() or not. I am > slightly in favor but don't feel very strongly about it. Perhaps we could try a co

Re: [PHP-DEV] Memory leak

2004-07-23 Thread Ilia Alshanetsky
On July 23, 2004 12:40 pm, you wrote: > At 11:54 AM 7/23/2004 -0400, Ilia Alshanetsky wrote: > >On July 23, 2004 11:42 am, Andi Gutmans wrote: > > > Why do we need one extra byte? > > > >We do not. > > > > > Anyway, the question is if we should return to alloca() or not. I am > > > slightly in favo

Re: [PHP-DEV] Memory leak

2004-07-23 Thread Andi Gutmans
At 12:51 PM 7/23/2004 -0400, Ilia Alshanetsky wrote: On July 23, 2004 12:40 pm, you wrote: > At 11:54 AM 7/23/2004 -0400, Ilia Alshanetsky wrote: > >On July 23, 2004 11:42 am, Andi Gutmans wrote: > > > Why do we need one extra byte? > > > >We do not. > > > > > Anyway, the question is if we should r

Re: [PHP-DEV] [PATCH] two small typos in php.ini.* and mail.c

2004-07-23 Thread Andi Gutmans
This should probably be applied but what if people are using them already? Any idea when these were introduced? Andi At 04:38 PM 7/23/2004 +0400, Antony Dovgal wrote: Hi all! Two small patches to fix typos in php.ini-dist, php.ini-recommended & mail.c These patches fix bug #29122. --- WBR, Antony

Re: [PHP-DEV] fp, rounding, decimal arithmetic - definitive account?

2004-07-23 Thread Andi Gutmans
Hi George, Although a bit long, your email was an interesting read. I am not quite sure how we should approach this problem as PHP's FP has gone through a zillion patches in the past few years. Adding another INI option is always something I try and keep away from when possible. As in general, I

Re: [PHP-DEV] Memory leak

2004-07-23 Thread Lukas Smith
message from marcus börger: "I have fixed the problem, without the need for an additional byte" regards, Lukas Smith aka Proxy -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Memory leak

2004-07-23 Thread Sterling Hughes
dooalocaaa, damnit On Fri, 23 Jul 2004 09:54:27 -0700, Andi Gutmans <[EMAIL PROTECTED]> wrote: > At 12:51 PM 7/23/2004 -0400, Ilia Alshanetsky wrote: > >On July 23, 2004 12:40 pm, you wrote: > > > At 11:54 AM 7/23/2004 -0400, Ilia Alshanetsky

Re: [PHP-DEV] Memory leak

2004-07-23 Thread Andi Gutmans
:) Ilia, you heard the man. I don't think he leaves you much choice unless you want to risk him waiting for you in a dark alley with a surprise :) Andi At 01:09 PM 7/23/2004 -0700, Sterling Hughes wrote: dooalocaaa, damnit On Fri, 23 Jul 200

Re: [PHP-DEV] Memory leak

2004-07-23 Thread Ilia Alshanetsky
Fine fine... let's rever it... I don't feel like carrying brass knuckles with me all the time. Ilia On July 23, 2004 04:36 pm, Andi Gutmans wrote: > :) > > Ilia, you heard the man. I don't think he leaves you much choice unless you > want to risk him waiting for you in a dark alley with a surpri

[PHP-DEV] [PATCH] time/001.phpt fix

2004-07-23 Thread Joe Orton
[resend] There's no reason why gettimeofday() shouldn''t return the same time in successive calls; this test fails spuriously on Linux/x86_64 (which has a particularly fast gettimeofday() implementation). --- ext/standard/tests/time/001.phpt23 May 2003 20:56:33 - 1.4.2.2 +++ ext/stan

[PHP-DEV] [PATCH] fix symbol namespace pollution from bundled libgd

2004-07-23 Thread Joe Orton
[resend, though I notice gd just got updated with some new functions so the symbol list is out of date. Feedback welcome on the principal of the change, anyway] Building the bundled libgd library into PHP causes symbol namespace pollution; if any other Apache modules link a different version of l

Re: [PHP-DEV] Memory leak

2004-07-23 Thread George Schlossnagle
Sterling's not as tough as he looks. On Jul 23, 2004, at 5:05 PM, Ilia Alshanetsky wrote: Fine fine... let's rever it... I don't feel like carrying brass knuckles with me all the time. Ilia On July 23, 2004 04:36 pm, Andi Gutmans wrote: :) Ilia, you heard the man. I don't think he leaves you much

Re: [PHP-DEV] [PATCH] time/001.phpt fix

2004-07-23 Thread Andi Gutmans
Yep you're right. It can definitely return the same time twice in a row. I'll commit this. At 10:17 PM 7/23/2004 +0100, Joe Orton wrote: [resend] There's no reason why gettimeofday() shouldn''t return the same time in successive calls; this test fails spuriously on Linux/x86_64 (which has a parti

Re: [PHP-DEV] Memory leak

2004-07-23 Thread Adam Maccabee Trachtenberg
On Fri, 23 Jul 2004, George Schlossnagle wrote: > Sterling's not as tough as he looks. That's easy to say when you're 3,000 miles across the country. Then again, I know you're going to be together in Portland next week, so there's something for me to look forward to. :) -adam -- [EMAIL PROTEC