Re: [PHP-DEV] Feature Request #5919 case-insensitive version of str_replace()

2003-01-30 Thread Ilia A.
> Well, actually, I would prefer to see a proper BNDM > implementation in the tree. > > - character classes are handled for free > (i.e. a case insensitive search does not take longer) > > - combining shift-and and automata is much faster than our > current naive algorit

Re: [PHP-DEV] Feature Request #5919 case-insensitive version ofstr_replace()

2003-01-29 Thread Sascha Schumann
> One last optimization to save memcpys when needle_len == str_len (thanks > again ilia): > > Actual Patch: > http://169.229.139.97/test/str_ireplace.diff-5.txt > > Resultant string.c for easy reading: > http://169.229.139.97/test/string-5.c > > I've heard enough Ayes over Nays (here, in bugs.php.n

Re: [PHP-DEV] Feature Request #5919 case-insensitive version of str_replace()

2003-01-29 Thread Sara Golemon
> better and better... > One last optimization to save memcpys when needle_len == str_len (thanks again ilia): Actual Patch: http://169.229.139.97/test/str_ireplace.diff-5.txt Resultant string.c for easy reading: http://169.229.139.97/test/string-5.c I've heard enough Ayes over Nays (here, in bu

Re: [PHP-DEV] Feature Request #5919 case-insensitive version of str_replace()

2003-01-29 Thread Marcus Börger
At 00:47 30.01.2003, Edin Kadribasic wrote: > I don't even see the speed difference as an issue as much as (A) > simplicity for the user who hasn't figured out regex yet, (B) consistency > (we have 'i' versions of most other string functions, why not this one?) +1 for the reasons stated above.

Re: [PHP-DEV] Feature Request #5919 case-insensitive version of str_replace()

2003-01-29 Thread Edin Kadribasic
> I don't even see the speed difference as an issue as much as (A) > simplicity for the user who hasn't figured out regex yet, (B) consistency > (we have 'i' versions of most other string functions, why not this one?) +1 for the reasons stated above. Edin -- PHP Development Mailing List

Re: [PHP-DEV] Feature Request #5919 case-insensitive version of str_replace()

2003-01-29 Thread Sara Golemon
better and better... Ilia offered up an optimized version of php_str_to_str which skips string resizing and handles do-no-work scenarios up front. I've made necessary changes to make this case_optional and made a new patch: http://169.229.139.97/test/str_ireplace.diff-4.txt as well as posting w

Re: [PHP-DEV] Feature Request #5919 case-insensitive version of str_replace()

2003-01-29 Thread Stephen Thorne
On Thu, 30 Jan 2003 09:09, Ilia A. wrote: > On January 29, 2003 04:35 pm, Shane Caraveo wrote: > > What's the benchmark code? How is the benchmark difference on large > > text (ie. 100K of text) vs. small text (1K or smaller)? > > Attached is the benchmark script that I've used. I've intentionally

Re: [PHP-DEV] Feature Request #5919 case-insensitive version of str_replace()

2003-01-29 Thread Ilia A.
On January 29, 2003 04:35 pm, Shane Caraveo wrote: > What's the benchmark code? How is the benchmark difference on large > text (ie. 100K of text) vs. small text (1K or smaller)? Attached is the benchmark script that I've used. I've intentionally used 'small' strings, since that is what I imagin

Re: [PHP-DEV] Feature Request #5919 case-insensitive version of str_replace()

2003-01-29 Thread Stephen Thorne
Gah. I botched that, I didn't reset the timer. Total Time: 00:00:03.08 //str_replace Total Time: 00:00:04.32 //preg_replace Total Time: 00:00:03.05 //str_replace Total Time: 00:00:03.67 //preg_replace Total Time: 00:00:03.27 //str_replace Total Time: 00:00:04.40 //preg_replace Closer than I thou

Re: [PHP-DEV] Feature Request #5919 case-insensitive version of str_replace()

2003-01-29 Thread Stephen Thorne
On Thu, 30 Jan 2003 06:48, Ilia A. wrote: > > I may be wrong since I haven't profiled this, but my understanding is > > that str_replace is much faster than doing either of the regex > > replacements. For that reason alone, there is a use for it. > > Normally it would be quite faster, however once

Re: [PHP-DEV] Feature Request #5919 case-insensitive version ofstr_replace()

2003-01-29 Thread Dan Kalowsky
I'd tip my hat towards implementing it. Pollita has a good point on consistency and for those who don't know regex's. On Wed, 29 Jan 2003, Sara Golemon wrote: > >> I may be wrong since I haven't profiled this, but my understanding is > >> that str_replace is much faster than doing either of the

[Fwd: Re: [PHP-DEV] Feature Request #5919 case-insensitive version of str_replace()]

2003-01-29 Thread Sara Golemon
whoops, missent just to sascha instead of list... >> On a related topic, the 'boyer' option of str_replace isn't even >> documented. That alternate method of performing str_replaces look >> like it's a bit more efficient (no benchmarkes atm) but I'm wondering >> if there's a specific reasons why

Re: [PHP-DEV] Feature Request #5919 case-insensitive version of str_replace()

2003-01-29 Thread Shane Caraveo
Ilia A. wrote: I may be wrong since I haven't profiled this, but my understanding is that str_replace is much faster than doing either of the regex replacements. For that reason alone, there is a use for it. Normally it would be quite faster, however once case sensitivity is added to the mix I

Re: [PHP-DEV] Feature Request #5919 case-insensitive version ofstr_replace()

2003-01-29 Thread Sascha Schumann
> On a related topic, the 'boyer' option of str_replace isn't even > documented. That alternate method of performing str_replaces look like > it's a bit more efficient (no benchmarkes atm) but I'm wondering if > there's a specific reasons why it wasn't documented yet. The BM algorithm is outd

Re: [PHP-DEV] Feature Request #5919 case-insensitive version ofstr_replace()

2003-01-29 Thread Sascha Schumann
I suggest to check out http://citeseer.nj.nec.com/navarro01fast.html The presented BNDM algorithm is one of the fastest string searching algorithm while being easy to implement. Its main loop is faster than the naive str_replace implementation(*). Check out a C test impl

Re: [PHP-DEV] Feature Request #5919 case-insensitive version of str_replace()

2003-01-29 Thread Sara Golemon
>> I may be wrong since I haven't profiled this, but my understanding is >> that str_replace is much faster than doing either of the regex >> replacements. For that reason alone, there is a use for it. > > Normally it would be quite faster, however once case sensitivity is > added to the mix I be

Re: [PHP-DEV] Feature Request #5919 case-insensitive version of str_replace()

2003-01-29 Thread Ilia A.
> I may be wrong since I haven't profiled this, but my understanding is > that str_replace is much faster than doing either of the regex > replacements. For that reason alone, there is a use for it. Normally it would be quite faster, however once case sensitivity is added to the mix I believe th

Re: [PHP-DEV] Feature Request #5919 case-insensitive version of str_replace()

2003-01-29 Thread Shane Caraveo
Derick Rethans wrote: On Wed, 29 Jan 2003, Sara Golemon wrote: I've got an implementation put together, the patch for which can be viewed at: http://169.229.139.97/test/str_ireplace.diff.txt After some comments on IRC, here's an alternate version to the above patch. This second approach av

Re: [PHP-DEV] Feature Request #5919 case-insensitive version ofstr_replace()

2003-01-29 Thread Derick Rethans
On Wed, 29 Jan 2003, Sara Golemon wrote: > > I've got an implementation put together, the patch for which can be > > viewed at: > > > > http://169.229.139.97/test/str_ireplace.diff.txt > > > After some comments on IRC, here's an alternate version to the above > patch. This second approach avoids

Re: [PHP-DEV] Feature Request #5919 case-insensitive version of str_replace()

2003-01-29 Thread Sara Golemon
> I've got an implementation put together, the patch for which can be > viewed at: > > http://169.229.139.97/test/str_ireplace.diff.txt > After some comments on IRC, here's an alternate version to the above patch. This second approach avoids creating php_memnstri by simply searching through a copy

[PHP-DEV] Feature Request #5919 case-insensitive version of str_replace()

2003-01-29 Thread Sara Golemon
This feature request (which seems worth doing) has sat on the back burner awhile. Probably because, in the words of one commenter, those who can produce the patch are just using regex instead. I've got an implementation put together, the patch for which can be viewed at: http://169.229.139.97/te

Re: [PHP-DEV] Feature Request: Auto Include a Function

2003-01-14 Thread Andrey Hristov
sage - From: "Brian T. Allen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 13, 2003 10:21 PM Subject: [PHP-DEV] Feature Request: Auto Include a Function > Hi, > > Please accept my apologies in advance if this is not the correct place > for thi

RE: [PHP-DEV] Feature Request: Auto Include a Function

2003-01-13 Thread Derick Rethans
On Mon, 13 Jan 2003, Brian T. Allen wrote: > If a hash file were used it would only have to "search" for the function > once, and even then only in the functions directory (like the include > directory, but specifically for functions). After that the order would > be: > > 1) Execute the function

RE: [PHP-DEV] Feature Request: Auto Include a Function

2003-01-13 Thread Sterling Hughes
onday, January 13, 2003 2:16 PM > > Subject: Re: [PHP-DEV] Feature Request: Auto Include a Function > > > > > > I'm not a PHP Developer but I see a few problems with this. > > I'm not a PHP Developer either, but I use it 12 hours a day in my work. >

RE: [PHP-DEV] Feature Request: Auto Include a Function

2003-01-13 Thread Brian T. Allen
> From: Andrew Brampton [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 13, 2003 2:16 PM > Subject: Re: [PHP-DEV] Feature Request: Auto Include a Function > > > I'm not a PHP Developer but I see a few problems with this. I'm not a PHP Developer either, but I

Re: [PHP-DEV] Feature Request: Auto Include a Function

2003-01-13 Thread Andrew Brampton
hen sure it would of been nice, like C does searching through .h files, but since its not I don't think its a good idea. Andrew - Original Message - From: "Brian T. Allen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 13, 2003 8:21 PM Subject

[PHP-DEV] Feature Request: Auto Include a Function

2003-01-13 Thread Brian T. Allen
Hi, Please accept my apologies in advance if this is not the correct place for this request. This may exist, but I haven't been able to find it, and I think it would be REALLY helpful and convenient. The idea is this: When you write a script and call a function: PHP could automatically look

Re: [PHP-DEV] Feature request -- feedback welcomed.

2002-10-06 Thread Andi Gutmans
You already have "public" which you can use instead of "var". I think method would look very nice but I don't think it's worth creating another reserved word. Andi At 01:34 PM 9/28/2002 -0600, Lamont R. Peterson wrote: >All: > >I can't hardly wait for PHP 4.3 (Zend 2.0) to hit the streets. I c

RE: [PHP-DEV] Feature request -- feedback welcomed.

2002-09-30 Thread Lukas Smith
age- > From: Shamim Islam [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 30, 2002 8:48 PM > To: Lamont R. Peterson; [EMAIL PROTECTED] > Subject: Re: [PHP-DEV] Feature request -- feedback welcomed. > > On the surface, it sounds like a good idea but underneath the semantic

Re: [PHP-DEV] Feature request -- feedback welcomed.

2002-09-30 Thread Shamim Islam
On the surface, it sounds like a good idea but underneath the semantic change is fraught with logical inconsistencies. A method is specifically a function declared within a class context. A static method is a static function declared within a class context. A method by itself has no meaning and

Re: [PHP-DEV] Feature request -- feedback welcomed.

2002-09-28 Thread Sascha Cunz
> Uhm... 4.3.0 will not ship with Zend 2.0, that will b ethe honour of PHP > 5.0.0. But one can compile Zend 2.0 into PHP 4 - i think Zeev posted an HowTo some weeks ago. Regards Sascha -- PHP Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Feature request -- feedback welcomed.

2002-09-28 Thread Sebastian Bergmann
Sebastian Bergmann wrote: > His name is "Derick", like the TV inspector. +almost (my bad, http://us.imdb.com/Title?0070981) -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.

Re: [PHP-DEV] Feature request -- feedback welcomed.

2002-09-28 Thread Pierre-Alain Joye
On Sat, 28 Sep 2002 22:23:08 +0200 Sebastian Bergmann <[EMAIL PROTECTED]> wrote: > His name is "Derick", like the TV inspector. yup, but he s more funny ;-) -- PHP Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Feature request -- feedback welcomed.

2002-09-28 Thread Sebastian Bergmann
"Lamont R. Peterson" wrote: > Derek & All: His name is "Derick", like the TV inspector. -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/ -- PHP Development Mailing Lis

Re: [PHP-DEV] Feature request -- feedback welcomed.

2002-09-28 Thread Lamont R. Peterson
Derek & All: [NOTE: The root message of this thread is the first I've read with this list. Therefore, I don't know what's been talked about here. I'll happily admit that this makes it much easier for me to look stupid when asking questions.] On Saturday 28 September 2002 13:50, [EMAIL PROTEC

Re: [PHP-DEV] Feature request -- feedback welcomed.

2002-09-28 Thread derick
On Sat, 28 Sep 2002, Lamont R. Peterson wrote: > All: > > I can't hardly wait for PHP 4.3 (Zend 2.0) to hit the streets. I can't > express how anxiously I've been waiting for the class model to be reworked. > Great job! Uhm... 4.3.0 will not ship with Zend 2.0, that will b ethe honour of PH

[PHP-DEV] Feature request -- feedback welcomed.

2002-09-28 Thread Lamont R. Peterson
All: I can't hardly wait for PHP 4.3 (Zend 2.0) to hit the streets. I can't express how anxiously I've been waiting for the class model to be reworked. Great job! I would, however, like to see a couple of simple additions to the planned release (if these are already coming, then I just have

Re: [PHP-DEV] FEATURE REQUEST: symlinks under NT

2002-07-09 Thread Shane Caraveo
Shell Shortcuts could be used to implement symlink like behaviour, and it would be compatible on more systems, but it would be a bigger pain to implement in PHP. As far as the directory junctions, this is how MS describes them: # NTFS Directory Junctions. These are NTFS directories that can be

Re: Re: Re: [PHP-DEV] FEATURE REQUEST: symlinks under NT

2002-07-09 Thread Timo Weingärtner
ck, if the filesystem, the link is created in, is really NTFS. Timo -Original Message- From: Zeev Suraski [mailto:[EMAIL PROTECTED]] Sent: Montag, 8. Juli 2002 08:05 To: Timo Weingärtner Cc: [EMAIL PROTECTED] Subject: Re: Re: [PHP-DEV] FEATURE REQUEST: symlinks under NT Again, the fa

Re: Re: [PHP-DEV] FEATURE REQUEST: symlinks under NT

2002-07-08 Thread Zeev Suraski
Apache 2.x recognizes junctions >under NT (Options FollowSymlinks). It would be nice to have the code >included in PHP. > >Thanks in advance, Timo Weingärtner > >-Original Message- >From: Zeev Suraski [mailto:[EMAIL PROTECTED]] >Sent: Samstag, 6. Juli 2002 16:55 >T

Re: Re: [PHP-DEV] FEATURE REQUEST: symlinks under NT

2002-07-07 Thread Timo Weingärtner
al Message- From: Zeev Suraski [mailto:[EMAIL PROTECTED]] Sent: Samstag, 6. Juli 2002 16:55 To: Timo Weingärtner Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] FEATURE REQUEST: symlinks under NT Are you sure they're equivalent to symlinks? They only work with directories as far as I know, whi

Re: [PHP-DEV] FEATURE REQUEST: symlinks under NT

2002-07-06 Thread Zeev Suraski
Are you sure they're equivalent to symlinks? They only work with directories as far as I know, which renders them significantly less useful than UNIX symlinks. Zeev At 05:26 PM 7/6/2002, Timo Weingärtner wrote: >NTFS supports directory junctions which are equivalent to unix symlinks. >I found

[PHP-DEV] FEATURE REQUEST: symlinks under NT

2002-07-06 Thread Timo Weingärtner
NTFS supports directory junctions which are equivalent to unix symlinks. I found a tool that can create, read and delete such junctions. Is there are posiibility to include that code into php so that it supports it in realpath(), symlink(), linkinfo(), readlink(), filetype(), is_link(), stat(), ls

Re: [PHP-DEV] feature request

2002-07-05 Thread Stig S. Bakken
Is there a "portable" way to implement this on all/most OS'es? Please submit this feature request on bugs.php.net. - Stig On Wed, 2002-07-03 at 23:06, veins wrote: > hi, > I have a feature request for the exec() family. > I was thinking of adding a fourth optionnal argument to be passed as > t

[PHP-DEV] feature request

2002-07-03 Thread veins
hi, I have a feature request for the exec() family. I was thinking of adding a fourth optionnal argument to be passed as the argv[0] so that the name that appears in a 'ps' can be changed. The reason is simple, as many people do, I usually have php call a shell script or a perl script on the syst

[PHP-DEV] Feature Request

2002-05-22 Thread Roberto Berto
Can you take a look on bug #12669 and #14712? Its about auto-globals user definied variables - ie: user can set some variables to be global in all scopes, allways global. Quick link: http://bugs.php.net/bug.php?id=12669 Atenciosamente,

Re: [PHP-DEV] Feature Request: Session Module

2002-05-05 Thread Steve Meyers
I figured it out, it was a problem in APC that was causing it. Deleting the compiled PHP files fixed the problem. I have no idea why that fixed it, but it did. Markus Fischer wrote: > Hi, > > http://bugs.php.net/report.php > > - Markus > > On Sat, May 04, 2002 at 06:20:28PM -0

Re: [PHP-DEV] Feature Request: Session Module

2002-05-04 Thread Sebastian Bergmann
Steve Meyers wrote: > Do you need a backtrace of it? If so, how do I do that? http://www.php.net/manual/en/faq.installation.php#faq.installation.nodata -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Did I help you? Consider a gift: http://w

Re: [PHP-DEV] Feature Request: Session Module

2002-05-04 Thread Markus Fischer
Hi, http://bugs.php.net/report.php - Markus On Sat, May 04, 2002 at 06:20:28PM -0600, Steve Meyers wrote : > I just tried ext/shmop, and without even using it, the fact that it is > compiled in to php causes it to segfault on every request. > > Here's my ./configure line > > ./c

Re: [PHP-DEV] Feature Request: Session Module

2002-05-04 Thread Steve Meyers
I just tried ext/shmop, and without even using it, the fact that it is compiled in to php causes it to segfault on every request. Here's my ./configure line ./configure --with-mysql=/usr --with-pgsql --enable-ftp --with-ldap --with-gmp --disable-pear --enable-shmop --enable-apc --with-apache=

Re: [PHP-DEV] Feature Request: Session Module

2002-05-04 Thread Yasuo Ohgaki
Markus Fischer wrote: > Hi, > > I think what you want can (and should) be done with shared > memory, ext/shmop . This way you exchange values as you want > (it's not tied to sessions in anyway, btw). > Markus' method works nicely for single server It is recommended way. Try ses

Re: [PHP-DEV] Feature Request: Session Module

2002-05-04 Thread Markus Fischer
Hi, I think what you want can (and should) be done with shared memory, ext/shmop . This way you exchange values as you want (it's not tied to sessions in anyway, btw). - Markus On Sat, May 04, 2002 at 11:08:52AM +0200, Michael Virnstein wrote : > Hi! > > What really would

[PHP-DEV] Feature Request: Session Module

2002-05-04 Thread Michael Virnstein
Hi! What really would be useful for the session module, is a grouping mechanism for sessions, so i can set up variable scopes and share variables among different session: every session has private variables. that's the way it works now. i can register a variable to a session and there's no way to

Re: [PHP-DEV] feature request for __LINE__, __FILE__ and trigger_error

2002-04-26 Thread Robert Cummings
I wrote this extension a while back, but I never released it since I didn't follow coding style and it was my first forage into extension coding for PHP. It should be what your looking for though for the most part... the function of usefulness is: get_function_call_stack() which will return an ar

Re: [PHP-DEV] feature request for __LINE__, __FILE__ andtrigger_error

2002-04-25 Thread Alan Knowles
__LINE__ , __FILE__ (and now __FUNCTION__ & __CLASS__) are converted at compile time into a string - have a look at zend/zend_language_scanner.l for more details. regards alan Michael Virnstein wrote: >A short question on this: >how about __LINE__? >doesn't this also require runtime context

Re: [PHP-DEV] feature request for __LINE__, __FILE__ andtrigger_error

2002-04-25 Thread Michael Virnstein
A short question on this: how about __LINE__? doesn't this also require runtime context or am i wrong? if so, why it is a constant then, not a function? Michael "Stig S. Bakken" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > __FILE__ is compiled

Re: [PHP-DEV] feature request for __LINE__, __FILE__ andtrigger_error

2002-04-25 Thread Michael Virnstein
Hi, you may be right, but this was only a suggestion. If you know a better way doing this, no problem. I thought of something like __FILE__ and __LINE__, because these constants are easy to use. If we have a function for this, not a constant, it's also ok for me. Michael "Stig S. Bakken" <[EMAI

Re: [PHP-DEV] feature request

2002-04-25 Thread Roland Tapken
Hi! Am Wed, 24 Apr 2002 22:15:19 +0200 schrieb Daniel Lorch <[EMAIL PROTECTED]>: > function line_count($string) { > return count(preg_split("/\r?\n/", $string)); > } Why not simply use a substr_count($string, "\n")? It works fine for me... cu, Roland Tapken -- Please reply to: [EMAIL PROTE

Re[2]: [PHP-DEV] feature request

2002-04-25 Thread Daniel Lorch
Hi, > Anyway. There were some discussions lately to implement > something like word_count() and similar friends. Though I > don't remember what has happened, you might want to look it > up in the archive an join the discussion (It was just a week > ago or so I think). There w

Re: [PHP-DEV] feature request

2002-04-24 Thread Markus Fischer
Hi, people fail to understand the reason why to "bloat" PHP with just another function which is really just a call to another function (e.g. preg_*() in PHP. As for parsing an ini file, this is certainly not true. Anyway. There were some discussions lately to implement

RE: [PHP-DEV] feature request

2002-04-24 Thread Nikolai Devereaux
> Here I'm asking myself: what function would be easier for user to > create: counting spaces in a string or parsing the .ini file or touch > and chown? Parsing an INI file isn't difficult. It requires the same amount of knowledge to do as counting spaces or lines, albeit with a bunch more typi

Re: [PHP-DEV] feature request for __LINE__, __FILE__ andtrigger_error

2002-04-24 Thread Stig S. Bakken
Hi, __FILE__ is compiled into a constant string by Zend. You can think of it as equivalent of putting a string with the filename there instead. It is constant. __CFILE__ would require runtime context (which function called us), so it makes no sense as a constant. Derick's xdebug extension wil

RE: [PHP-DEV] feature request

2002-04-24 Thread Maxim Maletsky \(PHPBeginner.com\)
> > Especially when you have such fancy buit-ins like "parse_ini"file" and > "pathinfo", and other built in unix commands like "touch", "chown", and > "chmod". Here I'm asking myself: what function would be easier for user to create: counting spaces in a string or parsing the .ini file or touch

Re: [PHP-DEV] feature request for __LINE__, __FILE__ and trigger_error

2002-04-24 Thread php4
Addressed to: [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from [EMAIL PROTECTED] Wed, 24 Apr 2002 21:06:41 +0200 (CEST) > > Hello Michael, > > I'm working (80% done) on an extension for this. It should be finished in > a few days. It doesn't feature the __C*__ things

Re: [PHP-DEV] feature request

2002-04-24 Thread Nikolai Devereaux
> function line_count($string) { > return count(preg_split("/\r?\n/", $string)); > } > > function word_count($string) { > return count(preg_split("/\s+/", $string)); > } > > There will be a PEAR-string class, which includes functions similar to > this. I assigned it to me some days ago and I w

Re[2]: [PHP-DEV] feature request

2002-04-24 Thread Daniel Lorch
Hi, > $wc = strlen(preg_replace('/\W*\w*/', 'x', file_get_contents($file)); > Look, no arrays! :-) > - Stig is this faster than the array-based solution? -daniel -- PHP Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] feature request

2002-04-24 Thread Stig S. Bakken
$wc = strlen(preg_replace('/\W*\w*/', 'x', file_get_contents($file)); Look, no arrays! :-) - Stig On Wed, 2002-04-24 at 20:20, Nikolai Devereaux wrote: > It would be great if there was a function in the filesystem family similar > to the unix command "wc". It'd be nice to not have to write si

Re: [PHP-DEV] feature request

2002-04-24 Thread Daniel Lorch
Hi, > It would be great if there was a function in the filesystem family similar > to the unix command "wc". It'd be nice to not have to write simple wrappers > around system calls or creating arrays to get the number of words or lines > in a file. function line_count($string) { return count(

Re: [PHP-DEV] feature request for __LINE__, __FILE__ and trigger_error

2002-04-24 Thread Michael Virnstein
an additional thought: if __CFILE__ and __CLINE__ are used outside of a function/method, both should be NULL. and trigger_error should only overwrite its __FILE__ and __LINE__ settings, if they are NOT NULL. And if one of the __FILE__ , __LINE parameters of trigger_error is NOT NULL, both have to

Re: [PHP-DEV] feature request for __LINE__, __FILE__ and trigger_error

2002-04-24 Thread Michael Virnstein
wow...your fast! :) thanx..that would be really great! Michael <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello Michael, > > I'm working (80% done) on an extension for this. It should be finished in > a few days. It doesn't feature the __C*__ things

Re: [PHP-DEV] feature request for __LINE__, __FILE__ and trigger_error

2002-04-24 Thread derick
Hello Michael, I'm working (80% done) on an extension for this. It should be finished in a few days. It doesn't feature the __C*__ things yet, but I can add a function for that too. I'll keep you posted, Derick On Wed, 24 Apr 2002, Michael Virnstein wrote: > It would be really useful for wr

[PHP-DEV] feature request for __LINE__, __FILE__ and trigger_error

2002-04-24 Thread Michael Virnstein
It would be really useful for writing functions/Classes, if i were able to determine the __FILE__ and __LINE__ of the script, that is calling my function, without the need to send __FILE__ and __LINE__ as parameter to my function. E.g. __CFILE__ for calling script and __CLINE__ for line in the cal

[PHP-DEV] feature request

2002-04-24 Thread Nikolai Devereaux
It would be great if there was a function in the filesystem family similar to the unix command "wc". It'd be nice to not have to write simple wrappers around system calls or creating arrays to get the number of words or lines in a file. For example, to get the number of lines in a file, I have t

Re: [PHP-DEV] Feature request: anonymous usage of returned values

2002-04-20 Thread Andi Gutmans
This isn't planned for Engine 2 but you could use: list($year) = localtime($time); Andi At 03:17 20/04/2002 +0200, Markus Fischer wrote: > I've brought this up on the Zend Engine2 list a while ago. > The result was that it is not planned to support > dereferencing of arrays from

Re: [PHP-DEV] Feature request: anonymous usage of returned values

2002-04-19 Thread Markus Fischer
I've brought this up on the Zend Engine2 list a while ago. The result was that it is not planned to support dereferencing of arrays from e.g. return value on the fly. - Markus On Fri, Apr 19, 2002 at 07:26:26PM -0500, Derek Moore wrote : > I've been playin' around with Horde and

[PHP-DEV] Feature request: anonymous usage of returned values

2002-04-19 Thread Derek Moore
I've been playin' around with Horde and IMP lately... And I've done a lot of PHP and Perl work in the past... One of the things I really like about PHP is how it has most of the really cool features of Perl that I enjoy, but lacks some of the things that annoy me about Perl. I was making som

Re: [PHP-DEV] Feature Request for pcre_match*()

2002-03-04 Thread derick
Hello, can you please post a unified diff (diff -u)? That's much more readable. regards, Derick On Mon, 4 Mar 2002, 'Ricky' S Dhatt wrote: > Hi - > > I'd like to ask that the pcre_match*() functions be modified such that > they can also return position info on where the match(s) occured, akin

[PHP-DEV] Feature Request for pcre_match*()

2002-03-04 Thread 'Ricky' S Dhatt
Hi - I'd like to ask that the pcre_match*() functions be modified such that they can also return position info on where the match(s) occured, akin to Perl's pos(). I think this would be a very useful addition, plus it requires minimal code changes since the actual function, php_pcre_match() compu

Re: [PHP-DEV] Feature Request: add HTML 4.01 support into DOMXML extension?

2001-12-06 Thread Jaroslaw Kolakowski
> Can you tell more on what that patch is about and it's availability? Look at http://rainbow.mimuw.edu.pl/~jkolakow/domxml/ Regards, Jaroslaw Kolakowski -- PHP Development Mailing List To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PR

Re: [PHP-DEV] Feature Request: add HTML 4.01 support into DOMXML extension?

2001-12-06 Thread Teodor Cimpoesu
Hi Jaroslaw! On Wed, 05 Dec 2001, Jaroslaw Kolakowski wrote: > > But, even if we don't agree with his opinion on templates, what about > > the features that libxml provides which are currently unused by PHP, > > including HTML 4.01-support (I don't know exactly what libxml can do)? > > Are the

Re: [PHP-DEV] Feature Request: add HTML 4.01 support into DOMXML extension?

2001-12-05 Thread Jaroslaw Kolakowski
> But, even if we don't agree with his opinion on templates, what about > the features that libxml provides which are currently unused by PHP, > including HTML 4.01-support (I don't know exactly what libxml can do)? > Are there any plans to make them accessible from PHP? It definately > would

Re: [PHP-DEV] Feature Request: add HTML 4.01 support into DOMXML extension?

2001-12-05 Thread Andrei Zmievski
On Wed, 05 Dec 2001, Alexander Wagner wrote: > But, even if we don't agree with his opinion on templates, what about > the features that libxml provides which are currently unused by PHP, > including HTML 4.01-support (I don't know exactly what libxml can do)? > Are there any plans to make them

Re: [PHP-DEV] Feature Request: add HTML 4.01 support into DOMXML extension?

2001-12-05 Thread Alexander Wagner
Andrei Zmievski wrote: > > there's no point in using a home-brewn scripting language > > to do those tasks, is there? all the constructs are already part > > of the php language... Are you aware of the concept of "domain-specific languages"? There is a point. > Are you done? I'm definately with

Re: [PHP-DEV] Feature Request: add HTML 4.01 support into DOMXML extension?

2001-12-05 Thread Andrei Zmievski
On Wed, 05 Dec 2001, Lauri Liinat wrote: > > hi, > > has anybody ever thought about supporting HTML 4.01 in > the DOMXML extension as Gnome libxml supports it anyway? > > should be a relatively simple addon, yet extremely useful for > processing layout templates and finally killing the long thr

[PHP-DEV] Feature Request: add HTML 4.01 support into DOMXML extension?

2001-12-05 Thread Lauri Liinat
hi, has anybody ever thought about supporting HTML 4.01 in the DOMXML extension as Gnome libxml supports it anyway? should be a relatively simple addon, yet extremely useful for processing layout templates and finally killing the long thread of discussion on the brain-dead text-substituting tem

[PHP-DEV] Feature request: Line numbering for .phps display

2001-07-26 Thread Ray A. Akey
I hope this is the right place for this. If not, please refer me to the proper place. :) Are there any plans to have PHP support the option of showing line numbers for PHP Source (.phps) display? This would be a great feature to add to your list if it is not already planned. -- Ray A. Akey / H

Re: [PHP-DEV] feature request

2001-03-20 Thread Phil Driscoll
>That is the only thing that I see of any real use as well. I was just >humoring Andi and his idea that we would soon be requesting that feature of >knowing which one failed the test. I was really voting no for the original feature - just returning true or false - unless it can be shown (and imp

Re: [PHP-DEV] feature request

2001-03-19 Thread Andi Gutmans
I think it makes sense to have empty() behave the same as isset() (they are brother functions). empty($a, $b, $c) would return 0 if non are empty and 1 if one of those variables is empty. Andi At 12:22 AM 3/20/2001 -0500, Jon Parise wrote: >On Mon, Mar 19, 2001 at 11:35:31PM +0200, Zeev Surask

Re: [PHP-DEV] feature request

2001-03-19 Thread Jon Parise
On Mon, Mar 19, 2001 at 11:35:31PM +0200, Zeev Suraski wrote: > Fact is, using isset() with multiple arguments is much more necessary in > real world than other is_*() functions. isset() is very often used to > validate user input. Then should the same argument be applied to empty(), too? Fo

Re: [PHP-DEV] feature request

2001-03-19 Thread Jon Parise
On Mon, Mar 19, 2001 at 11:27:09PM +0200, Zeev Suraski wrote: > What is iseverythingelse()? I don't think we have any other > iseverythingelse() function. I'd assume Lars is referring to the is_{type} functions: http://www.php.net/manual/en/ref.var.php -- Jon Parise ([EMAIL PROTECTED])

Re: [PHP-DEV] feature request

2001-03-19 Thread Phil Driscoll
Zeev said: >Define 'change their behavior' though? 'change their behavior' === 'change their behavior' in a subtle way :) > Almost all SQL functions take an >optional argument which is the link id. That is by design, and doesn't >really mean anything here, I'm not saying it does mean anything

Re: [PHP-DEV] feature request

2001-03-19 Thread Lars Torben Wilson
Zeev Suraski writes: > What is iseverythingelse()? I don't think we have any other > iseverythingelse() function. > > The fact isset() is a language construct does make a serious > difference. It already is very different from functions, and not in its > underlying implementation but its sem

RE: [PHP-DEV] feature request

2001-03-19 Thread Zeev Suraski
I might consider using it like if (isSet($a, $b) && is_int($a, >$b)). > >-Chris > > > -Original Message- > > From: Phil Driscoll [mailto:[EMAIL PROTECTED]] > > Sent: Monday, 19 March, 2001 2-11 pM > > To: Chris Newbill; Zeev Suraski; Andi Gutmans

RE: [PHP-DEV] feature request

2001-03-19 Thread Chris Newbill
Andi Gutmans; [EMAIL PROTECTED] > Cc: PHP DEV > Subject: Re: [PHP-DEV] feature request > > > Andi said: > > >isset() is not an internal function but a language construct. I > disagree on > >the "using additional arguments for other stuff part". It's o

Re: [PHP-DEV] feature request

2001-03-19 Thread Zeev Suraski
At 23:10 19/3/2001, Phil Driscoll wrote: >Andi said: > > >isset() is not an internal function but a language construct. I disagree on > >the "using additional arguments for other stuff part". It's often very > >weird that functions behave differently according to the way they are > >called > >I've

Re: [PHP-DEV] feature request

2001-03-19 Thread Zeev Suraski
What is iseverythingelse()? I don't think we have any other iseverythingelse() function. The fact isset() is a language construct does make a serious difference. It already is very different from functions, and not in its underlying implementation but its semantics. Zeev At 23:21 19/3/2001

Re: [PHP-DEV] feature request

2001-03-19 Thread Lars Torben Wilson
Jason Greene writes: > > Generally using functions for two different purposes is a bad idea, but > > enhancing functions with additional arguments that extend its functionality > > is not too bad. In this case, adding n arguments is perhaps the extension > > that makes the most sense for isset

Re: [PHP-DEV] feature request

2001-03-19 Thread Jason Greene
> Generally using functions for two different purposes is a bad idea, but > enhancing functions with additional arguments that extend its functionality > is not too bad. In this case, adding n arguments is perhaps the extension > that makes the most sense for isset(), so we should go with it.

Re: [PHP-DEV] feature request

2001-03-19 Thread Phil Driscoll
Andi said: >isset() is not an internal function but a language construct. I disagree on >the "using additional arguments for other stuff part". It's often very >weird that functions behave differently according to the way they are >called I've just done a quick count of the php functions which t

RE: [PHP-DEV] feature request

2001-03-19 Thread Chris Newbill
> From: Andi Gutmans [mailto:[EMAIL PROTECTED]] > Sent: Monday, 19 March, 2001 1-12 pM > To: Jason Greene; Phil Driscoll; Chris Newbill; Zeev Suraski > Cc: PHP DEV > Subject: Re: [PHP-DEV] feature request > > > Ugh, that's exactly what I didn't want to get into. If yo

  1   2   >