Re: [PHP] preg_replace_callback

2012-04-20 Thread TR Shaw
Bug #61792: preg_replace_callback memory leak On Apr 20, 2012, at 4:43 PM, Igor Konforti wrote: > Please reply here with bug #number > > :) > > On Fri, Apr 20, 2012 at 23:21, TR Shaw wrote: > >> >> On Apr 20, 2012, at 4:18 PM, Stuart Dallas wrote: >> >>> On 20 Apr 2012, at 21:00, TR Shaw wr

Re: [PHP] preg_replace_callback

2012-04-20 Thread Igor Konforti
Please reply here with bug #number :) On Fri, Apr 20, 2012 at 23:21, TR Shaw wrote: > > On Apr 20, 2012, at 4:18 PM, Stuart Dallas wrote: > > > On 20 Apr 2012, at 21:00, TR Shaw wrote: > > > >> It appears that preg_replace_callback has a memory leak at least in > version 5.3.8. > > > > Based o

Re: [PHP] preg_replace_callback

2012-04-20 Thread TR Shaw
On Apr 20, 2012, at 4:18 PM, Stuart Dallas wrote: > On 20 Apr 2012, at 21:00, TR Shaw wrote: > >> It appears that preg_replace_callback has a memory leak at least in version >> 5.3.8. > > Based on what? If you have a repeatable test that demonstrates this behaviour > please create a bug repo

Re: [PHP] preg_replace_callback

2012-04-20 Thread Stuart Dallas
On 20 Apr 2012, at 21:00, TR Shaw wrote: > It appears that preg_replace_callback has a memory leak at least in version > 5.3.8. Based on what? If you have a repeatable test that demonstrates this behaviour please create a bug report at https://bugs.php.net/ with all the details. -Stuart --

[PHP] preg_replace_callback

2012-04-20 Thread TR Shaw
It appears that preg_replace_callback has a memory leak at least in version 5.3.8. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP preg_replace_callback with unicode

2012-03-30 Thread Jimmy Chen
I wrote a simple script below to simulate my problem. Both my string and pattern contain unicode characters. Basically, if I run it from command line (php -f test.php), it prints "match" as expected. But if I run it through web server (apache, http://localhost/test.php), it prints "no match". I

Re: [PHP] preg_replace_callback(), how to pass function argument/param?

2008-03-30 Thread Micky Hulse
Casey wrote: What does mah_process_tags do anyway? XD Ah, hehe... Oh, basically I am trying to write a plugin for the Textpattern CMS: processTags() is a core TXP function... Basically, it parses any TXP template tags (). Long story short, I am am modifying the

Re: [PHP] preg_replace_callback(), how to pass function argument/param?

2008-03-30 Thread Casey
On Sun, Mar 30, 2008 at 10:06 PM, Micky Hulse <[EMAIL PROTECTED]> wrote: > Casey wrote: > > Hmmm. I've searched around, and it seems that only a global would work :/ > > Thanks for the help Casey! I really appreciate it. :) > > Yah, I think I will use a global for now... Until I can think of an

Re: [PHP] preg_replace_callback(), how to pass function argument/param?

2008-03-30 Thread Micky Hulse
Casey wrote: Hmmm. I've searched around, and it seems that only a global would work :/ Thanks for the help Casey! I really appreciate it. :) Yah, I think I will use a global for now... Until I can think of an alternative coding approach. Have a good one! Cheers, Micky -- Wishlist:

Re: [PHP] preg_replace_callback(), how to pass function argument/param?

2008-03-30 Thread Casey
On Sun, Mar 30, 2008 at 9:37 PM, Micky Hulse <[EMAIL PROTECTED]> wrote: > Casey wrote: > > preg_replace_callback($f, 'mah_processTags(\'$0\', $arg1)', $text); > > Does this work? > > Awww, does not seem to work. :( > > But maybe I need to dink with the code a bit more... > > I would like to av

Re: [PHP] preg_replace_callback(), how to pass function argument/param?

2008-03-30 Thread Micky Hulse
Casey wrote: preg_replace_callback($f, 'mah_processTags(\'$0\', $arg1)', $text); Does this work? Awww, does not seem to work. :( But maybe I need to dink with the code a bit more... I would like to avoid setting a global here. :D Thanks for the help Casey! I will let you know if I get it wor

Re: [PHP] preg_replace_callback(), how to pass function argument/param?

2008-03-30 Thread micky
Hi Casey! Many thanks for your help! I greatly appreciate it. :) >> preg_replace_callback($f, 'mah_processTags($arg1)', $text); > preg_replace_callback($f, 'mah_processTags(\'$0\', $arg1)', $text); > Does this work? Ah, interesting... Thanks for the example code... I am at work now, but will try

Re: [PHP] preg_replace_callback(), how to pass function argument/param?

2008-03-30 Thread Casey
On Sun, Mar 30, 2008 at 1:17 AM, Micky Hulse <[EMAIL PROTECTED]> wrote: > Hi, > > This is probably simple to answer for most of ya'll, but... > > preg_replace_callback($f, 'mah_processTags', $text); > > Besides the matches, how would I pass function args/param to > mah_processTags()? > > For e

[PHP] preg_replace_callback(), how to pass function argument/param?

2008-03-30 Thread Micky Hulse
Hi, This is probably simple to answer for most of ya'll, but... preg_replace_callback($f, 'mah_processTags', $text); Besides the matches, how would I pass function args/param to mah_processTags()? For example, I would like to do something like this: preg_replace_callback($f, 'mah_processTag

Re: [PHP] preg_replace_callback

2006-05-04 Thread Richard Lynch
On Thu, May 4, 2006 8:03 am, tJey wrote: > Hi. I have problem with preg_replace_callback. It seems that my > pattern > is bad, but I can't find any error. > > Pattern : \[\s*((\d|\w|_)+)\s*\] > this pattern is intended to find strings like "[field]", > "[ fi12_eld]"... > > but every time I get warn

RE: [PHP] preg_replace_callback

2006-05-04 Thread Ford, Mike
On 04 May 2006 14:04, tJey wrote: > Hi. I have problem with preg_replace_callback. It seems that my > pattern is bad, but I can't find any error. > > Pattern : > this pattern is intended to find strings like "[field]", "[ > fi12_eld]"... > > but every time I get warning message > "Warning: pre

RE: [PHP] preg_replace_callback

2006-05-04 Thread Jay Blanchard
[snip] Hi. I have problem with preg_replace_callback. It seems that my pattern is bad, but I can't find any error. Pattern : \[\s*((\d|\w|_)+)\s*\] this pattern is intended to find strings like "[field]", "[ fi12_eld]"... but every time I get warning message "Warning: preg_replace_callback(): De

[PHP] preg_replace_callback

2006-05-04 Thread tJey
Hi. I have problem with preg_replace_callback. It seems that my pattern is bad, but I can't find any error. Pattern : \[\s*((\d|\w|_)+)\s*\] this pattern is intended to find strings like "[field]", "[ fi12_eld]"... but every time I get warning message "Warning: preg_replace_callback(): Delimite

Re: [PHP] preg_replace_callback clarification

2004-09-09 Thread François Moreau
Thank you very much for your quick answer! Le 04-09-09, à 10:10, John Holmes a écrit : From: "François Moreau" <[EMAIL PROTECTED]> The piece of code you have submitted (see under) is interesting, although there is one thing I don't find meaning to, even after RTFM, and STFG(Searching The Funky Go

Re: [PHP] preg_replace_callback clarification

2004-09-09 Thread John Holmes
From: "François Moreau" <[EMAIL PROTECTED]> The piece of code you have submitted (see under) is interesting, although there is one thing I don't find meaning to, even after RTFM, and STFG(Searching The Funky Google). In your regular expression pattern '#.*#Uis', what does this do : #...#Uis [sni

[PHP] preg_replace_callback clarification

2004-09-09 Thread François Moreau
The piece of code you have submitted (see under) is interesting, although there is one thing I don't find meaning to, even after RTFM, and STFG(Searching The Funky Google). In your regular expression pattern '#.*#Uis', what does this do : #...#Uis Thank you very much Piece of code : [snip] $st

Re: [PHP] preg_replace_callback and brackets

2003-03-30 Thread Marek Kilimajer
Maybe you should use /\b/ word boundary instead of all the or's Joshua Moore-Oliva wrote: I'm kind of confused right now... when I call preg_replace_callback with a regular expression with brackets, sometimes I get an array back with multiple elements like array(3) { [0]=> string(19)

[PHP] preg_replace_callback and brackets

2003-03-29 Thread Joshua Moore-Oliva
I'm kind of confused right now... when I call preg_replace_callback with a regular expression with brackets, sometimes I get an array back with multiple elements like array(3) { [0]=> string(19) "http://www.aol.com " [1]=> string(0) "" [2]=> string(19) "http://www.aol.com " } and I

[PHP] Re: [PHP-DOC] Re: [PHP] preg_replace_callback

2002-11-18 Thread Derick Rethans
ead of the one with > > callback? > > > > ---John Holmes... > > > > > -Original Message- > > > From: Bikeman [mailto:[EMAIL PROTECTED]] > > > Sent: Sunday, November 17, 2002 2:23 PM > > > To: [EMAIL PROTECTED]; [EMAIL PROTECT

Re: [PHP] preg_replace_callback

2002-11-18 Thread Bikeman
tern will be replaced with. > > Maybe you just need the regular preg_replace(), instead of the one with > callback? > > ---John Holmes... > > > -Original Message- > > From: Bikeman [mailto:[EMAIL PROTECTED]] > > Sent: Sunday, November 17, 2002 2:23 PM

RE: [PHP] preg_replace_callback

2002-11-17 Thread Philip Olson
lace(), instead of the one with > callback? > > ---John Holmes... > > > -Original Message- > > From: Bikeman [mailto:[EMAIL PROTECTED]] > > Sent: Sunday, November 17, 2002 2:23 PM > > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; php- > > [EMAIL PR

RE: [PHP] preg_replace_callback

2002-11-17 Thread John W. Holmes
] > Sent: Sunday, November 17, 2002 2:23 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; php- > [EMAIL PROTECTED] > Subject: [PHP] preg_replace_callback > > Hello. > > I have totally no clue at all wether I am posting in the right newsgroup > here, and I was not plannin

[PHP] preg_replace_callback

2002-11-17 Thread Bikeman
Hello. I have totally no clue at all wether I am posting in the right newsgroup here, and I was not planning on caching all messages in my (first time used, I prefer Outlook) Outlook Express before searching. So if I am disobeying all rules here ... I'm sorry ... I just am not an experienced ne

[PHP] preg_replace_callback

2002-07-17 Thread Rafael Fernandes
First, sorry for my elementary english... I need a function made for PHP3 that works like preg_replace_callback... Sugestions??? -- Rafael Fernandes WebDeveloper - Aleph TI Ltda. / Matrix Internet Provider E-Mail: [EMAIL PROTECTED] Uin: 5551571 -- PHP General Mailing List (http://www.php.net/)

[PHP] preg_replace_callback()

2001-09-08 Thread Arash Dejkam
Hi, What is a callback in preg_replace_callback(...) ? how can I use it ? can anybody give me an example ? Thanks, Arash -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administ