Re: [PHP-DEV] fgets()/fgetss() BC break in HEAD

2006-11-15 Thread Sara Golemon
Zeev- My IQ is higher than 12, and I don't see how defensive coding could have defended against this BC break. This code is missing error checking, but that could be quite reasonable (e.g. if you check ahead of time that the file is big enough to match the format you're expecting - so it's n

Re: [PHP-DEV] typo in zend_API.h (add_index_ascii_string)

2006-11-15 Thread Antony Dovgal
Fixed, thanks. On 11/16/2006 01:41 AM, Michael Wallner wrote: There, length should be assigned to ___u_len. Regards, Index: Zend/zend_API.h === RCS file: /

[PHP-DEV] [PATCH] For Bug #38770

2006-11-15 Thread David Soria Parra
Hi internals, I tried to fix http://bugs.php.net/bug.php?id=38770. The pack and unpack function returns different values on different platform for options like "N". Example: print_r(unpack("N", pack("N", -3000))); prints -3000 und x86 and 4294937296 on x86_64. That happens because all the 32

[PHP-DEV] typo in zend_API.h (add_index_ascii_string)

2006-11-15 Thread Michael Wallner
There, length should be assigned to ___u_len. Regards, -- Michael Index: Zend/zend_API.h === RCS file: /repository/ZendEngine2/zend_API.h,v retrieving revision 1.268 diff -u -p -d -r1.268 zend_API.h --- Zend/zend_API.h 27 Oct 200

[PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/gettext gettext.c /ext/gettext/tests dcngettext.phpt gettext_basic.phpt gettext_basic_de.phpt /ext/gettext/tests/locale/de/LC_MESSAGES messages.mo messages.

2006-11-15 Thread Michael Wallner
Andrei Zmievski wrote: > Do you think that using filesystem encoding for domain is appropriate? Yes, because it'll be stuck into the path to the message catalogue: ///.mo Regards, -- Michael -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-15 Thread Richard Lynch
On Sat, November 11, 2006 7:37 am, Rasmus Lerdorf wrote: > helping to get rid of bogus reports or translating the really bad > reports into a simple reproducable test case is often the part that This is a plea for not being quite so bogus-trigger-happy as we have in the past. Many correct, if inc

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-15 Thread Richard Lynch
On Fri, November 10, 2006 12:19 pm, Sean Coates wrote: > of PHP applications that are developed for internal use. I don't know > of > anyone currently using PHP 4 to develop new PHP apps unless they're > for > external distribution. Are you living in a bubble? :-) :-) :-) There's a zillion ISPs t

Re: [PHP-DEV] fgets()/fgetss() BC break in HEAD

2006-11-15 Thread Stanislav Malyshev
Sorry, I meant to say "Noone with an IQ higher than twelve is relying on this." PHP Developer 1: Let's change functionality for some widely-used function and break BC, because we can and it is so much fun! PHP Developer 2: You know, breaking BC is not nice, people really rely on it and try to

Re: [PHP-DEV] fgets()/fgetss() BC break in HEAD

2006-11-15 Thread Zeev Suraski
At 13:04 15/11/2006, Sara Golemon wrote: [EMAIL PROTECTED] wrote: On Tue, November 14, 2006 2:59 pm, Sara Golemon wrote: keeping. I'll lay money that NOONE is relying on this, and I challenge any of you to prove me wrong on that count. E. You may want to re-think that bet... Surely somebo

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-15 Thread Richard Lynch
On Fri, November 10, 2006 10:51 am, Sean Coates wrote: +1 Given the usage of \ for string escaping, I'd have to vote for :::, I guess... But it wouldn't kill me if \ won the vote either. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist.

Re: [PHP-DEV] Binary strings from 6 in 5.2?

2006-11-15 Thread Rick Widmer
Richard Lynch wrote: How many sysadmins and other decision-makers out there aren't adopting PHP5.x, much less 6.x, because we've changed too many things too quickly in BC-incompatible ways? *THAT* is what is slowing the adoption rate, not the applications developers not WANTING to use the bet

Re: [PHP-DEV] Binary strings from 6 in 5.2?

2006-11-15 Thread Sara Golemon
[EMAIL PROTECTED] wrote: On Tue, November 14, 2006 3:08 pm, Sara Golemon wrote: How many applications out there aren't taking advantage of things like property visibility in PHP5 because they want to remain compatable with the myriad PHP4 installations? How much are compromises like that slowin

Re: [PHP-DEV] fgets()/fgetss() BC break in HEAD

2006-11-15 Thread Sara Golemon
[EMAIL PROTECTED] wrote: On Tue, November 14, 2006 2:59 pm, Sara Golemon wrote: keeping. I'll lay money that NOONE is relying on this, and I challenge any of you to prove me wrong on that count. E. You may want to re-think that bet... Surely somebody out there has: Sorry, I meant to s

Re: [PHP-DEV] Feature-Request - Macros

2006-11-15 Thread Mathias Bank
Richard Lynch schrieb: On Mon, November 13, 2006 4:42 am, Mathias Bank wrote: As you see, with this macro functions, it could be achieved any individual syntax. It would be a pleasure, if php could support it. It could shorten a lot of code. It sounds like you could submit a patch and get it i

Re: [PHP-DEV] Feature-Request - Macros

2006-11-15 Thread Richard Lynch
On Mon, November 13, 2006 4:42 am, Mathias Bank wrote: > As you see, with this macro functions, it could be achieved any > individual syntax. It would be a pleasure, if php could support it. It > could shorten a lot of code. It sounds like you could submit a patch and get it in... :-) While you a

Re: [PHP-DEV] SimpleXML: A bug or just an annoyance?

2006-11-15 Thread Richard Lynch
On Mon, November 13, 2006 9:29 am, Jochem Maas wrote: > that sounds about right. my experience with SimpleXML is that every is > either > a string, an object, an array depending on how you are looking at it > and regardless of > the situation auto-casting can be relied on to NOT do what you > want/

Re: [PHP-DEV] fgets()/fgetss() BC break in HEAD

2006-11-15 Thread Richard Lynch
On Tue, November 14, 2006 2:59 pm, Sara Golemon wrote: > keeping. I'll lay money that NOONE is relying on this, and I > challenge > any of you to prove me wrong on that count. E. You may want to re-think that bet... Surely somebody out there has: even if you and I both know how horrible t

Re: [PHP-DEV] Binary strings from 6 in 5.2?

2006-11-15 Thread Derick Rethans
On Wed, 15 Nov 2006, Richard Lynch wrote: > I didn't even read the patch, but unless it's guaranteed NOT to break > anything at all in php4 (yes, 4, not 5): > -1 It's guaranteed not to break anything, as the syntax currently just throws a parse error for this stuff. Derick -- PHP Internals -

Re: [PHP-DEV] cgi.check_shebang_line default value

2006-11-15 Thread Richard Lynch
On Tue, November 14, 2006 4:42 am, Dmitry Stogov wrote: > The following patch adds new INI directive for CGI SAPI. > It may enable/disable check for shebang line (#! /usr/bin/php) and as > result > improve performance of FastCGI. > > I set the default value for this directive to 1 (that means check

Re: [PHP-DEV] Binary strings from 6 in 5.2?

2006-11-15 Thread Richard Lynch
On Tue, November 14, 2006 3:08 pm, Sara Golemon wrote: > How many applications out there aren't taking advantage of things like > property visibility in PHP5 because they want to remain compatable > with > the myriad PHP4 installations? How much are compromises like that > slowing PHP5 adoption?

[PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/mhash mhash.c php_mhash.h

2006-11-15 Thread Sara Golemon
Ilia Alshanetsky wrote: Do we really need mhash extension in core of 6.0 given that ext/hash does everything mhash does without requiring external libs? Send it packin'. Siberian visas for anyone who still needs it. -Sara -- PHP Internals - PHP Runtime Development Mailing List To unsubscrib

Re: [PHP-DEV] PHP6 cleanup: Request Variable handling for variables with spaces

2006-11-15 Thread Richard Lynch
On Wed, November 15, 2006 4:12 am, Christopher Kunz wrote: > - Request variables that have leading whitespace are trimmed before > being > imported into the respective superglobal array. > - Request variables that have trailing whitespace have all whitespace > converted > to _ before being imported

Re: [PHP-DEV] Re: Feature-Request - Macros

2006-11-15 Thread Marcus Boerger
Hello Mathias, we would need a lexer/parser that support changing rules. That would mean changing bothtools. Eventhough that might happen if there are other reasons to do so,the toolswe change todo not necessarily support whatyou woule need. Based on our current experience re2c and lemon would b

Re: [PHP-DEV] Re: Namespaces in PHP 6 - ++$take

2006-11-15 Thread Marcus Boerger
Hello Richard, as though what you say is true the rules are different inside {} inside "". best regards marcus Wednesday, November 15, 2006, 9:39:48 AM, you wrote: > Would $foo = "{mynamespace\tables_class::myconst}"; > \t in "" is a tab. \m in "" is nothing but \m > Thats the sort of thing

[PHP-DEV] Re: Windows SAPI possible binary file operation bug and possible fix

2006-11-15 Thread Pierre
Hello, On 11/15/06, Wez Furlong <[EMAIL PROTECTED]> wrote: We cannot change it in SAPI where we are not the .exe because we don't own the process. Messing with that flag affects the entire process and could break things at a higher level. I call this kind of thing "library abuse", where one pie

[PHP-DEV] Re: Windows SAPI possible binary file operation bug and possible fix

2006-11-15 Thread Pierre
Hello, On 11/15/06, Wez Furlong <[EMAIL PROTECTED]> wrote: We cannot change it in SAPI where we are not the .exe because we don't own the process. Messing with that flag affects the entire process and could break things at a higher level. I call this kind of thing "library abuse", where one pie

[PHP-DEV] Re: Windows SAPI possible binary file operation bug and possible fix

2006-11-15 Thread Wez Furlong
We cannot change it in SAPI where we are not the .exe because we don't own the process. Messing with that flag affects the entire process and could break things at a higher level. I call this kind of thing "library abuse", where one piece of code assumes that it is the only consumer of the librar

[PHP-DEV] Re: Windows SAPI possible binary file operation bug and possible fix

2006-11-15 Thread Pierre
Hi Dmitry, I think that changing global behavior (_fmode = _O_BINARY;) is not a good idea. May be this code should be removed from CGI and CLI too. A big -1. It works and is known to work. It has been there since years. May be we have a bug somewhere and _O_BINARY is not passed to open().

Re: [PHP-DEV] PHP6 cleanup: Request Variable handling for variables with spaces

2006-11-15 Thread Ilia Alshanetsky
On 15-Nov-06, at 5:12 AM, Christopher Kunz wrote: Hi all, I think I posted about this quite some time ago, but the issue is (as of PHP 5.2.0) still there: - Request variables that have leading whitespace are trimmed before being imported into the respective superglobal array. - Request

[PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/mhash mhash.c php_mhash.h

2006-11-15 Thread Ilia Alshanetsky
Do we really need mhash extension in core of 6.0 given that ext/hash does everything mhash does without requiring external libs? Ilia -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: Windows SAPI possible binary file operation bug and possible fix

2006-11-15 Thread Pierre
On 11/15/06, Pierre <[EMAIL PROTECTED]> wrote: _fmode is global per process. We should set the mode of stdin/out: _setmode( _fileno( stdin ), _O_BINARY ); If we need it and if it is already opened when we init the SAPI, but someone has to verify this point. I just checked it, we do set the m

[PHP-DEV] Re: Feature-Request - Macros

2006-11-15 Thread Mathias Bank
Mathias Bank schrieb: Hallo, you know, that there was often a discussion about a "ifsetor" function. I want to generalize this discussion. If you know LISP, there is a fantastic macro function which allows you to generate own syntax (not a c macro function, which is really bad). It would be f

[PHP-DEV] Windows SAPI possible binary file operation bug and possible fix

2006-11-15 Thread Pierre
Hello, While debugging a zip bug (http://pecl.php.net/bugs/bug.php?id=9278), I was wondering what's the difference between CLI/CGI and ISAPI or Apache2. The same code works perfectly in CLI and CGI on windows and using all SAPIs on linux (apache1 or 2, cli, cgi). It was not that obvious, even aft

RE: [PHP-DEV] cgi.check_shebang_line default value

2006-11-15 Thread Dmitry Stogov
Seems I got such good results because of measuring mistake. Now I see only 4% speedup. :( Dmitry. > -Original Message- > From: Dmitry Stogov [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 15, 2006 1:13 PM > To: 'Marcus Boerger' > Cc: internals@lists.php.net; 'Andi Gutmans'; 'Stani

[PHP-DEV] PHP6 cleanup: Request Variable handling for variables with spaces

2006-11-15 Thread Christopher Kunz
Hi all, I think I posted about this quite some time ago, but the issue is (as of PHP 5.2.0) still there: - Request variables that have leading whitespace are trimmed before being imported into the respective superglobal array. - Request variables that have trailing whitespace have all whitespace

RE: [PHP-DEV] cgi.check_shebang_line default value

2006-11-15 Thread Dmitry Stogov
The patch allow save one read() and one seek() syscall for each request. On hello.php () I got 430 req/sec without patch and 530 req/sec with patch. I think this INI directive is not a big cost for ~20% speedup. The test was done without concurency (ab -n1000 -c1). Thanks. Dmitry. > -Original

[PHP-DEV] Memeory leaks in ext/filter

2006-11-15 Thread Dmitry Stogov
Hi, I see a lot of memory leaks in ext filter when run php as FastCGI. The valgrind output follows. ==2482== 554 bytes in 27 blocks are definitely lost in loss record 37 of 56 ==2482==at 0x4005400: malloc (vg_replace_malloc.c:149) ==2482==by 0x82EE250: _emalloc (zend_alloc.c:1644) ==2482=

Re: [PHP-DEV] Re: Namespaces in PHP 6 - ++$take

2006-11-15 Thread Richard Quadling
Would $foo = "{mynamespace\tables_class::myconst}"; \t in "" is a tab. \m in "" is nothing but \m Thats the sort of thing I'm worried about. On 14/11/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: Hello Richard, The "#" is needed for CLI mode - thus we won't remove it. In fact we will not do a

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-15 Thread Derick Rethans
On Fri, 10 Nov 2006, Hans Lellelid wrote: > > >> I think there is far more > >> demand for a fast & stable PHP then for syntatic sugar features which > >> seem extremely useful, but in the end prove to carry too much baggage. > >> > > > > Nothing has been proven either way.. at least not pub

Re: [PHP-DEV] Binary strings from 6 in 5.2?

2006-11-15 Thread Derick Rethans
On Tue, 14 Nov 2006, Sara Golemon wrote: > With something like binary strings it's even more important since they > drastically change how the data is treated in PHP6 and can potentially cause > chunks to be transformed in unexpected ways. > > +1 on backporting these types of syntax placeholders.

Re: [PHP-DEV] cgi.check_shebang_line default value

2006-11-15 Thread Derick Rethans
On Tue, 14 Nov 2006, Ilia Alshanetsky wrote: > I think people who want the performance can disable the check, but we should > not break BC, certainly not at a patch level release. I agree there. Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.ph

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

2006-11-15 Thread Derick Rethans
On Fri, 3 Nov 2006, Ilia Alshanetsky wrote: > Hannes, > > As much as I like the concept I would prefer to hold it off until the next > minor release or PHP6. Yeah, same here. I would like to see this as well in PHP 6. regards, Derick -- Derick Rethans http://derickrethans.nl | http://ez.no |