[PHP-DEV] Re: Extensive reallocations in strtr, str_replace and implode

2006-02-20 Thread Wojtek Meler
Missing parentheses... Regards, Wojtek Meler Index: string.c === RCS file: /repository/php-src/ext/standard/string.c,v retrieving revision 1.333.2.52.2.3 diff -u -r1.333.2.52.2.3 string.c --- string.c 1 Jan 2006 13:46:58 -

[PHP-DEV] Extensive reallocations in strtr, str_replace and implode

2006-02-20 Thread Wojtek Meler
, Wojtek Meler Index: string.c === RCS file: /repository/php-src/ext/standard/string.c,v retrieving revision 1.333.2.52.2.3 diff -u -r1.333.2.52.2.3 string.c --- string.c 1 Jan 2006 13:46:58 - 1.333.2.52.2.3 +++ string.c 20 Feb 2006 10

[PHP-DEV] Re: crc32

2005-09-05 Thread Wojtek Meler
Ron Korving wrote: Wouldn't it be more practical to implement these as stream filters? Sure - I was not aware PHP5 streams - I'm still using PHP4 string.base64 is good choice. But I'm not sure if crc fit to streams. You can always implement fast userland filter with such function ;) . Wojtek

[PHP-DEV] Re: crc32

2005-09-05 Thread Wojtek Meler
Oops !!! I've left old license header. Here is smaller clean version that apply to CVS HEAD. Index: crc32.c === RCS file: /repository/php-src/ext/standard/crc32.c,v retrieving revision 1.16 diff -u -r1.16 crc32.c --- crc32.c 3 Aug 20

[PHP-DEV] crc32

2005-09-05 Thread Wojtek Meler
I've patched original crc32 PHP function to allow incremental crc32 counting. It touches only a few lines of original code. New crc32 function signature is int crc32(string str [,int prev_sum]) With this patch you can generate crc32 checksum for even large files without reading it contents

Re: [PHP-DEV] main/main.c - php_module_startup && additional modules

2004-12-08 Thread Wojtek Meler
Here you are. Andi Gutmans wrote: I was thinking about adding those two lines. Index: main.c === RCS file: /repository/php-src/main/main.c,v retrieving revision 1.512.2.56 diff -u -r1.512.2.56 main.c --- main.c 1 Oct 2004 14:27:13 -00

Re: [PHP-DEV] main/main.c - php_module_startup && additional modules

2004-11-23 Thread Wojtek Meler
? Regards, Wojtek Andi Gutmans wrote: Sounds like a good idea. Can you put a patch together which we can review? Andi At 01:04 PM 11/23/2004 +0100, Wojtek Meler wrote: Hi ! I'm writing my own sapi module and I'd like register 2 additional modules calling php_module_startup. I've not

[PHP-DEV] main/main.c - php_module_startup && additional modules

2004-11-23 Thread Wojtek Meler
Hi ! I'm writing my own sapi module and I'd like register 2 additional modules calling php_module_startup. I've noticed that it is imposible because int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_modules, uint num_additional_modules) is calling php_startup_extensio

[PHP-DEV] reentrancy in date/time functions (PHP_4_3)

2004-06-25 Thread Wojtek Meler
Hi ! Here is small patch which makes ext/standard/datetime.c & parsedate.y use reentrant versions of date/time functions declared in PHP (php_localtime_r & php_gmtime_r). May somebody commit it ? Regards, Wojtek Index: datetime.c ==

Re: [PHP-DEV] E_STRICT

2003-11-18 Thread Wojtek Meler
Andi Gutmans wrote: a) Not using var for member variables but moving to PPP. b) Not using is_a but using instanceof. c) references usage - things like: regards, Wojtek -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Zend Engine question

2003-10-30 Thread Wojtek Meler
Moriyoshi Koizumi wrote: Nope, it was decided long ago that the bug won't be fixed in ZE1. AFAIC there's been no definite cure so far, but perhaps it can be fixed somehow though I didn't managed to conceive anything reasonable. It seams that enabling this helps: #if 0 /* Will be fixed in ZE2, t

Re: [PHP-DEV] Zend Engine question

2003-10-30 Thread Wojtek Meler
Moriyoshi Koizumi wrote: Moriyoshi Koizumi wrote: First, maybe you want to see bug #22836 (http://bugs.php.net/22836), that appears to describe the very problem you have. Probably yes. I assume that it won't be fixed in ZE1, will it? Is there any way to fix it for own risk? I saw something in zen

Re: [PHP-DEV] Zend Engine question

2003-10-29 Thread Wojtek Meler
Moriyoshi Koizumi wrote: Hi, First, maybe you want to see bug #22836 (http://bugs.php.net/22836), that appears to describe the very problem you have. Probably yes. I assume that it won't be fixed in ZE1, will it? Is there any way to fix it for own risk? I saw something in zend_execute.c with co

[PHP-DEV] Zend Engine question

2003-10-29 Thread Wojtek Meler
Are there any tools for debugging ZE? I've got a problem with huge script that at some point behave like all variables were reference to single variable. I suspect that there is something wrong with EG(uninitialized_zval). Any hints how to fight it? I've compiled it with ZEND_INTENSIVE_DEBUGGING a

[PHP-DEV] Locale

2003-09-03 Thread Wojtek Meler
I wonder if it is "by design" that PHP don't read all LC_* settings from environment. In main/main.c we read LC_CTYPE only. I think at least LC_COLLATE also should be read. strcoll() behavior relay on this - strings are not properly compared. Maybe we can read all bu LC_NUMERIC settings from envi

Re: [PHP-DEV] Servlet SAPI Module

2003-09-01 Thread Wojtek Meler
Sebastian Bergmann wrote: about two or three times a month I receive mails concering the Servlet SAPI module of PHP 4. This module is not usable in production since it segfaults after the first or second request. Are there any plans to rewrite this SAPI module for PHP 5? One more question

Re: [PHP-DEV] userland macros

2003-08-18 Thread Wojtek Meler
Cristiano Duarte wrote: Is possible to implement userland macros in a PHP extension or it can only be implemented in the core? I know that macros is a preprocessor task and I think PHP has no preprocessor (does it?). So it's possible to implement a preprocessor ? I think you can use stream wra

Re: [PHP-DEV] [Proposal] Idea for Application level variables

2003-08-14 Thread Wojtek Meler
Davey wrote: MMCache can be used as a session handler, but this still has the pitfalls of the other solutions. If you were to implement $_APP(LICATION) as suggested, then it could indeed (in theory) use MMCache, just as $_SESSION does - Davey As far as I understand you just want to have anothe

Re: [PHP-DEV] [Proposal] Idea for Application level variables

2003-08-07 Thread Wojtek Meler
Davey wrote: Would mind that patch anyways, sounds good, just doesn't fulfill my needs/desires for $_APP(LICATION) You can find it on http://strony.wp.pl/wp/wmeler/ (auto_globals.patch) Regards, Wojtek -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.ne

Re: [PHP-DEV] Feature proposal

2003-07-23 Thread Wojtek Meler
Timm Friebe wrote: On Tue, 2003-07-22 at 19:48, Wojtek Meler wrote: I have to fight with people that using error suppression operator - they just hide their bugs. I wrote simple patch that allows set disable_error_suppression=On in php.ini that causes engine to ignore '@' operat

Re: [PHP-DEV] Feature proposal

2003-07-22 Thread Wojtek Meler
Ken Tossell wrote: But often errors/warnings are *not* bugs. Or maybe you don't want to show your users the ugly messages from something like include -- if ([EMAIL PROTECTED] 'foo.php') die('Couldn\'t..'); Well it is true. Sometimes it is needed and that's why this functionality is turned of

[PHP-DEV] Feature proposal

2003-07-22 Thread Wojtek Meler
I have to fight with people that using error suppression operator - they just hide their bugs. I wrote simple patch that allows set disable_error_suppression=On in php.ini that causes engine to ignore '@' operators. http://strony.wp.pl/wp/wmeler/error_suppression.patch.txt Regards, Wojtek -- PH

Re: [PHP-DEV] Apache 2 support

2003-06-28 Thread Wojtek Meler
Matt Parlane wrote: From that, can I assume that using PHP by itself with no external libraries is stable with Apache 2? I don't think so... http://bugs.php.net/bug.php?id=16820 is still open. But if you don't limit time for scripts it should work. regards, Wojtek -- PHP Internals - PHP Runtim

Re: [PHP-DEV] how to disable extension in cli

2003-04-02 Thread Wojtek Meler
On Wed, Apr 02, 2003 at 02:16:56PM +0200, Wojtek Meler wrote: > Is there a way to tell PHP to not include some sources in CLI build? > PHP_NEW_EXTENSION( mymodule , mymodule.c , nocli) doesn't work as I expected - it > doesn't include extension in main/internal_function

[PHP-DEV] how to disable extension in cli

2003-04-02 Thread Wojtek Meler
Is there a way to tell PHP to not include some sources in CLI build? PHP_NEW_EXTENSION( mymodule , mymodule.c , nocli) doesn't work as I expected - it doesn't include extension in main/internal_functions_cli.c but it link mymodule.o to sapi/cli/php. regards, Wojtek -- PHP Internals - PHP Runti

Re: [PHP-DEV] ZTS performance

2003-03-25 Thread Wojtek Meler
On Mon, Mar 24, 2003 at 09:59:36PM -0800, Zeev Suraski wrote: > If __thread is any similar to Tls under Windows (which would be my guess), > then we can't use it directly. We're already using pthread_setspecific so > we're extremely quick with fetches as it is. As I said, I also doubt very > m

Re: [PHP-DEV] ZTS performance

2003-03-25 Thread Wojtek Meler
On Mon, Mar 24, 2003 at 11:25:47PM +0200, Andi Gutmans wrote: > At 10:20 PM 3/24/2003 +0100, [EMAIL PROTECTED] wrote: > > > ZTS is *always* going to be slower than non ZTS. > > > >Yes, but it can be faster than it is. PHP doesn't use almost any shared > >resources (compiled regexs?) so why it is so

[PHP-DEV] ZTS performance

2003-03-24 Thread Wojtek Meler
Hi! I've done some performance tests of PHP with and without ZTS (RH7.2 - pthreads). I've noticed that ZTS is signifcally slower than normal mode. My machine was able to response for 100reqs/s without ZTS and 95reqs/s with ZTS. When I turned on turck mmcache (code cache & optimizer) it handled 400