Re: [PHP-DEV] [PATCH] Allow unsetting headers previously set by header()

2008-03-27 Thread Christian Schmidt
Richard Lynch wrote: At the risk of incurring the wrath of everybody else, I'd prefer to see a new function like header_unset (or unset_header) to "undo" a header. Currently header() supports adding, replacing and appending to existing headers as well as specifying the response status code, so I

Re: [PHP-DEV] [PATCH] Allow unsetting headers previously set by header()

2008-03-27 Thread Richard Lynch
On Thu, March 27, 2008 5:32 pm, Christian Schmidt wrote: > When a header has been set using header('Foo: bar') it can be replaced > with > other headers, but it cannot be removed. I like the idea of being able to "unset" headers. I'm not sure I like the idea of calling what looks lik an invalid h

Re: [PHP-DEV] [PATCH] date/timelib: use system timezone database

2008-03-27 Thread sean finney
hi, On Thursday 27 March 2008 10:26:57 pm Richard Lynch wrote: > Just recently, somebody wondered why PHP had the CORRECT time when > their web-server didn't... and vice versa. see for example: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=471104 if there were an *option* for php to

[PHP-DEV] PHP 5.2.6RC3 Released

2008-03-27 Thread Ilia Alshanetsky
A bit later then anticipated, but the 5.2.6RC3 was released finally today and the sources for the release can be found here: http://downloads.php.net/ilia/php-5.2.6RC3.tar.bz2 (md5sum: c765de110a33eb7a666c68e795840b0e) Windows binaries should become available in short order as well. All in

[PHP-DEV] [PATCH] Allow unsetting headers previously set by header()

2008-03-27 Thread Christian Schmidt
When a header has been set using header('Foo: bar') it can be replaced with other headers, but it cannot be removed. For instance, one could imagine that the auto_prepend_file calls header('Vary: Accept-Language') because most pages do language-negotiation. But if a single file generates, say,

Re: [PHP-DEV] making var_dump and var_export even better

2008-03-27 Thread Stanislav Malyshev
Also, about circular references. Isn't it possible to reuse the circular recognition from print_r and actually write out a reference to the offending piece? For var_export it isn't possible since there's no way to refer to the value being exported. -- Stanislav Malyshev, Zend Software Architec

Re: [PHP-DEV] Re: Backporting to 5_3

2008-03-27 Thread Stanislav Malyshev
What exactly does that change? $a = "foo"; list($b) = $a; var_dump($b); This is weird... I wouldn't go as far as saying nobody uses it - since experience shows there's somebody somewhere using any weird combination of PHP features imaginable - but it's definitely a strange code. Even though

[PHP-DEV] Re: Backporting to 5_3

2008-03-27 Thread Felipe Pena
Em Qua, 2008-03-26 às 23:43 -0300, Felipe Pena escreveu: > 2008/3/26, Johannes Schlüter <[EMAIL PROTECTED]>: > > > - Removed undocumented and incomplete support for strings in list() > > > operator. (Dmitry) > > > > > > What exactly does that change? > > $a = "foo"; list($b) = $a; var_dump($b);

Re: [PHP-DEV] [PATCH] date/timelib: use system timezone database

2008-03-27 Thread Cristian Rodriguez
>2008/3/27, Richard Lynch <[EMAIL PROTECTED]>: > As I understand the situation, if you can get ALL the sysadmins of the > world to update their [bleep] timezonedb frequently, PHP can drop the > internal timezonedb. OS vendors release timezone updates frecuently, there is no need for such bundl

[PHP-DEV] Re: phar API

2008-03-27 Thread Greg Beaver
Benjamin Schulz wrote: Hi, i just read the phar examples in the manual and found things like this: $p = new Phar('coollibrary.phar'); if (Phar::canWrite()) { $fp = fopen('hugefile.dat', 'rb'); $p['data/hugefile.dat'] = $fp; if (Phar::canCompress()) { $p['data/hugefile.dat']->

Re: [PHP-DEV] [PATCH] date/timelib: use system timezone database

2008-03-27 Thread Richard Lynch
On Thu, March 20, 2008 12:40 pm, sean finney wrote: > sorry for digging up this dead horse... > > On Thursday 10 January 2008 01:05:35 pm Joe Orton wrote: >> On Wed, Jan 09, 2008 at 09:03:02PM +0100, Derick Rethans wrote: >> > On Wed, 9 Jan 2008, Joe Orton wrote: >> > > It's a bit of a maintenance

Re: [PHP-DEV] phar API

2008-03-27 Thread Benjamin Schulz
Hi Marcus, First thing: yes i fully understand what the code is doing but i still think that it doesn't need to be so "hackish". I wouldn't call it hackish. I'd eventually call it new to people that haven't used the new PHP 5.0 features yet. I used PHP 5 when it had namespaces the first ti

Re: [PHP-DEV] Inclusion of PHP LiteSpeed SAPI in the standard PHP distribution?

2008-03-27 Thread Pierre Joye
Hi George, On Thu, Mar 27, 2008 at 8:11 PM, George Wang <[EMAIL PROTECTED]> wrote: > Hi Johannes, > > Thank you for the quick reply. > > > > Well, the idea is that all PHP-specific code is licensed under the same > > license terms. PCRE and GD are external libraries which live outside > > PHP'

Re: [PHP-DEV] Inclusion of PHP LiteSpeed SAPI in the standard PHP distribution?

2008-03-27 Thread George Wang
Hi Johannes, Thank you for the quick reply. Well, the idea is that all PHP-specific code is licensed under the same license terms. PCRE and GD are external libraries which live outside PHP's context and which are simply bundled. That's why the clear preference there is PHP License. OK, let

Re: [PHP-DEV] phar API

2008-03-27 Thread Marcus Boerger
Hello Benjamin, Thursday, March 27, 2008, 2:34:06 PM, you wrote: > Hi, > i just read the phar examples in the manual and found things like this: > $p = new Phar('coollibrary.phar'); > if (Phar::canWrite()) { > $fp = fopen('hugefile.dat', 'rb'); > $p['data/hugefile.dat'] = $fp; > i

Re: [PHP-DEV] Inconsistencies when accessing protected members

2008-03-27 Thread Stanislav Malyshev
Hi! - B1 and B2 both extend A. B2 is neither an ancestor nor a descendant of B1, but I suppose they could be considered to be part of the same class hierarchy because they are siblings. - f() is declared as protected in A and B1, but not declared at all in B2. Which means there exists A::f

Re: [PHP-DEV] REMINDER - stream wrappers in include_path

2008-03-27 Thread Marcus Boerger
Hello Dmitry, Thursday, March 27, 2008, 11:33:55 AM, you wrote: > Hi Greg, > in php_resolve_path() > - you removed (p - filename > 1) check but it means that c://tmp will be > used as stream wrapper Basically he doesn't need to. The code with your modifiactions is wrong now. He changed it t

Re: [PHP-DEV] BC break with php 5.2.6

2008-03-27 Thread Stanislav Malyshev
Hi! i noticed that some changes was made that 100% break all apps that do such stuff: class x extends y { public static function foo() { new self(); } } class y { private function __construct() { echo 'y::__construct()' . PHP_EOL; } } I think that priv

[PHP-DEV] CVS Account Request: tswicegood

2008-03-27 Thread Travis Swicegood
Various debauchery relating to php-src ;-) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] phar API

2008-03-27 Thread Lars Strojny
Hi Benjamin, Am Donnerstag, den 27.03.2008, 14:34 +0100 schrieb Benjamin Schulz: > Hi, > i just read the phar examples in the manual and found things like this: [...] > First thing: yes i fully understand what the code is doing but i still > think that it doesn't need to be so "hackish". One thing

[PHP-DEV] phar API

2008-03-27 Thread Benjamin Schulz
Hi, i just read the phar examples in the manual and found things like this: $p = new Phar('coollibrary.phar'); if (Phar::canWrite()) { $fp = fopen('hugefile.dat', 'rb'); $p['data/hugefile.dat'] = $fp; if (Phar::canCompress()) { $p['data/hugefile.dat']->setCompressedGZ(); }

Re: [PHP-DEV] Comments on #44393, ISAPI module patch?

2008-03-27 Thread Richard Krehbiel
On 3/26/08, Jani Taskinen <[EMAIL PROTECTED]> wrote: > > Richard Krehbiel kirjoitti: > > > [...] > > > > [...] > > It might help a bit if you put that patch online somewhere available for > download. A patch in the bug report is messed up and kinda unreadable.. > > Prov

[PHP-DEV] RE: [PHP-QA] BC break with php 5.2.6

2008-03-27 Thread Marco Kaiser
Hi Marcus, thanks for this conclusion. I just asked this because this changed in this release and should noticed in the readme or upgrade process because most singleton pattern implementations in some frameworks, for ie. ZF are using this code: class My_Controller_Front extends Zend_Controller_Fr

Re: [PHP-DEV] Inconsistencies when accessing protected members

2008-03-27 Thread Robin Fernandes
Hi all, thanks for thinking about this. On 26/03/2008, Marcus Boerger <[EMAIL PROTECTED]> wrote: > On 26/03/2008, Alexey Zakhlestin <[EMAIL PROTECTED]> wrote: > > > use case for "protected" is similiar, but relates to cases when you > > have hierarchy of classes, which still have some common fu

Re: [PHP-DEV] REMINDER - stream wrappers in include_path

2008-03-27 Thread Dmitry Stogov
Hi Greg, in php_resolve_path() - you removed (p - filename > 1) check but it means that c://tmp will be used as stream wrapper - you added check for !wrapper, but we don't need to do any filesystem search for filename with wrong wrapper I've removed this modifications. I also added proper

Re: [PHP-DEV] Backporting to 5_3

2008-03-27 Thread Lukas Kahwe Smith
On 26.03.2008, at 17:56, Pierre Joye wrote: On Wed, Mar 26, 2008 at 5:39 PM, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: Hi! - Added runtime JIT auto-globals fetching and caching. (Dmitry, Sara) Does this change any semantics, etc? Any reason why it wasn't merged in the first place?

[PHP-DEV] Re: [PHP-QA] BC break with php 5.2.6

2008-03-27 Thread Marcus Boerger
Hello Marco, Thursday, March 27, 2008, 9:25:48 AM, you wrote: > Hi, > i noticed that some changes was made that 100% break all apps that do such > stuff: > class x extends y > { > public static function foo() > { > new self(); > } > } > class y > { > private function __

Re: [PHP-DEV] short_open_tag

2008-03-27 Thread Marcus Boerger
Hello Jared, in theory, if you could make sure the instance gets destructoed prior to the end of the main script. After script end the order of destructor calls is not deterministic or better said it is but not depending on memory management. marcus Wednesday, March 26, 2008, 11:57:46 PM, you

Re: [PHP-DEV] BC break with php 5.2.6

2008-03-27 Thread Lokrain
Hello Marco, May be you should check the "[PHP-DEV] Inconsistencies when accessing protected members" thread. It's said there: Private means this API belongs to this class only, protected means this API > belongs to this class and the children. and you can find there a lot of useful thoughts a

[PHP-DEV] BC break with php 5.2.6

2008-03-27 Thread Marco Kaiser
Hi, i noticed that some changes was made that 100% break all apps that do such stuff: class x extends y { public static function foo() { new self(); } } class y { private function __construct() { echo 'y::__construct()' . PHP_EOL; } } x::foo(); with php

Re: [PHP-DEV] Re: [php-icu] Re: [PHP-DEV] Re: [php-icu] Graphemes and unicode vs intl extension

2008-03-27 Thread Lester Caine
Stanislav Malyshev wrote: Hi! I meant to duplicate the code from ext/date (where it belongs) in pecl/intl. Please notice the "pecl/intl" not php-src/ext. The goal is to provide the DateFormatter feature to php 5.2 users. Great, right now 5.2 users can use intl extension from pecl, including

Re: [PHP-DEV] Inconsistencies when accessing protected members

2008-03-27 Thread Lokrain
Hello Internals, This discussion was very interesting to me so I made some research about all languages OOP. Each time I saw definition of public, protected, private there was an explanation which never mentioned instances, but classes. I certainly thought that Richard is right saying: Surely it

[PHP-DEV] making var_dump and var_export even better

2008-03-27 Thread Karoly Negyesi
Hi, If var_dump would dump the type info into PHP comments then var_dump would be also valid PHP code. That'd be very cool. I guess this would be rather easy to code as we already have var_export. Also, about circular references. Isn't it possible to reuse the circular recognition from print_r an