[PHP-DEV] [PATCH] register shutdown actions for apache child die

2006-11-07 Thread Olexander Shtepa
apache2handler sapi registers cleanup functions only for main apache process. But apache 2 cleans _only_ child pool before it die. This is reason for unclean connection closes in persistent connection (in pgsql exactly). This patch adds shutdown actions registration on each child init. Apache

Re: [PHP-DEV] Where to setlocale(3)?

2006-11-07 Thread Jochem Maas
Michael B Allen wrote: How does one PROPERLY set the locale under which PHP scripts run? Is it a script level property, if you want. PHP level property, yes. HTTP level property or dont know inherited from the OS default? the default is inherited from the OS unless something is broken.

[PHP-DEV] CVS Account Request: amitp

2006-11-07 Thread Amit Perelman
Will be contributing bug fixes and improvements. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [PATCH] Scalar type hinting ;)

2006-11-07 Thread Richard Quadling
Not in direct reply to any message. Type hinting is on for classes and arrays (maybe resources too - not sure - but certainly a good idea if not). Why? From my perspective, it allows me to not deal with potential errors either in the data or my coding or another developers coding. Type hinting

Re: [PHP-DEV] [PATCH] Scalar type hinting ;)

2006-11-07 Thread Ron Korving
I wouldn't like E_NOTICE. I agree that the result should be a NULL value if a conversion fails, but E_NOTICE shouldn't be mixed in the area of user data. All error reporting should be limited to code, not input. I don't want the users of my software to be able to trigger E_NOTICE (or any error

Re: [PHP-DEV] [PATCH] Scalar type hinting ;)

2006-11-07 Thread Richard Quadling
On 07/11/06, Ron Korving [EMAIL PROTECTED] wrote: I wouldn't like E_NOTICE. I agree that the result should be a NULL value if a conversion fails, but E_NOTICE shouldn't be mixed in the area of user data. All error reporting should be limited to code, not input. I don't want the users of my

[PHP-DEV] [PATCH] = doesn't remove old references like unset()

2006-11-07 Thread Matt Wilmas
Hi (Dmitry?), See Bug #33282 -- I saw it in the Bug Summary; don't know if there are other related ones... Same applies to foreach ($arr ... $v) which is where I noticed it last week with var_dump($arr). All elements that WERE referenced but aren't anymore still have is_ref=1 (when refcount=1).

[PHP-DEV] Re: [PATCH] = doesn't remove old references like unset()

2006-11-07 Thread Michael Wallner
Matt Wilmas wrote: Hi (Dmitry?), See Bug #33282 -- I saw it in the Bug Summary; don't know if there are other related ones... Same applies to foreach ($arr ... $v) which is where I noticed it last week with var_dump($arr). All elements that WERE referenced but aren't anymore still have

Re: [PHP-DEV] Re: [PATCH] = doesn't remove old references like unset()

2006-11-07 Thread Matt Wilmas
- Original Message - From: Michael Wallner Sent: Tuesday, November 07, 2006 Matt Wilmas wrote: Hi (Dmitry?), See Bug #33282 -- I saw it in the Bug Summary; don't know if there are other related ones... Same applies to foreach ($arr ... $v) which is where I noticed it last week

RE: [PHP-DEV] Re: [PATCH] = doesn't remove old references like unset()

2006-11-07 Thread Dmitry Stogov
Hi Michael, I think the patch is correct. Really you can just call zval_ptr_dtor() to make the magic in one place. Thanks. Dmitry. -Original Message- From: Michael Wallner [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 07, 2006 2:08 PM To: internals@lists.php.net; Dmitry Stogov

Re: [PHP-DEV] [PATCH] Scalar type hinting ;)

2006-11-07 Thread Christian Schneider
ini_set('humour', On); Richard Quadling wrote: Type hinting is part of the documentation. Sure, hungarian notation of variable names (where the type is represented within the variable name itself) is a good start, but when you get to things like a 4d array of I wouldn't have expected anyone

Re: [PHP-DEV] [PATCH] Scalar type hinting ;)

2006-11-07 Thread Richard Quadling
On 07/11/06, Christian Schneider [EMAIL PROTECTED] wrote: Error: Incompatible use of constant 'we' us didn't make any sense! Maybe y'all, or everyone would have been better. grin / -- - Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 Standing

Re: [PHP-DEV] Re: [PATCH] = doesn't remove old references like unset()

2006-11-07 Thread Michael Wallner
Dmitry Stogov wrote: Hi Michael, I think the patch is correct. Really you can just call zval_ptr_dtor() to make the magic in one place. Someone with Zend/ karma needs to take care of it then. Regards, -- Michael -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe,

Re: [PHP-DEV] Where to setlocale(3)?

2006-11-07 Thread Ilia Alshanetsky
You just call the setlocale() function in PHP. On 6-Nov-06, at 10:18 PM, Michael B Allen wrote: How does one PROPERLY set the locale under which PHP scripts run? Is it a script level property, PHP level property, HTTP level property or inherited from the OS default? I have a module that

Re: [PHP-DEV] [PATCH] Scalar type hinting ;)

2006-11-07 Thread Richard Lynch
On Tue, November 7, 2006 4:19 am, Ron Korving wrote: I wouldn't like E_NOTICE. I agree that the result should be a NULL value if a conversion fails, Assume, for the sake of argument, that someday one's type-hint could be: function foo ([NULL | int] $bar){ } Also assume the paramter passed to

RE: [PHP-DEV] Re: [PATCH] = doesn't remove old references like unset()

2006-11-07 Thread Dmitry Stogov
OK. I'll care about it. Not sure if I'll have time tomorrow, but I'll try not to delay it a lot. Thank you. Dmitry. -Original Message- From: Michael Wallner [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 07, 2006 6:54 PM To: internals@lists.php.net; Dmitry Stogov Subject: Re:

Re: [PHP-DEV] Re: [PATCH] = doesn't remove old references like unset()

2006-11-07 Thread Ilia Alshanetsky
Dmitry, I've applied the adjusted patch. On 7-Nov-06, at 2:08 PM, Dmitry Stogov wrote: OK. I'll care about it. Not sure if I'll have time tomorrow, but I'll try not to delay it a lot. Thank you. Dmitry. -Original Message- From: Michael Wallner [mailto:[EMAIL PROTECTED] Sent:

Re: [PHP-DEV] array/HashTable filling optimization

2006-11-07 Thread Ilia Alshanetsky
Looks like a good optimization to me. On 5-Nov-06, at 7:30 AM, Matt Wilmas wrote: Hi Nuno, Late reply, but I'm glad the idea was able to be used. :-) To the other hash people: While checking how Ilia made implode() faster in 5.2, I think I found another optimization that can be done.

[PHP-DEV] class defs from file?

2006-11-07 Thread Tony Bibbs
First post here so be gentle ;-) I've got a unique need to get the class definitions from a file. Now I can write the string manipulation necessary to do this myself with the help of some regex-fu but I was wondering if it wouldn't be possible to add a method like: array

Re: [PHP-DEV] class defs from file?

2006-11-07 Thread Jochem Maas
Tony Bibbs wrote: First post here so be gentle ;-) I've got a unique need to get the class definitions from a file. Now I can write the string manipulation necessary to do this myself with the help of some regex-fu but I was wondering if it wouldn't be possible to add a method like:

Re: [PHP-DEV] class defs from file?

2006-11-07 Thread Tony Bibbs
Ah, token_get_all() might be what I'm after. Thanks, --Tony Jochem Maas wrote: Tony Bibbs wrote: First post here so be gentle ;-) I've got a unique need to get the class definitions from a file. Now I can write the string manipulation necessary to do this myself with the help of some

[PHP-DEV] Re: Problems with 301 redirects

2006-11-07 Thread ianevans
header(Location: http://...,false,301); This works here with PHP 5.1.7-dev and 5.2.1-dev and mod_fastcgi. Have you tried just that line? Without any HTTP/-header? I've tried every combination. Just tried it again and it still returns a 302. BTW, not using mod_fastcgi as we're not running