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 --

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

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

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

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] Re: [PHP-DOC] Re: [PHP] preg_replace_callback

2002-11-18 Thread Derick Rethans
On Mon, 18 Nov 2002, Bikeman wrote: > Me again. > > I think this really badly documented in the documentation. I hope this is > solved soon. To be more detailed: The preg_replace_callback()-function > documentation says it is the same as the preg_replacec()-function, except > for the second ar

Re: [PHP] preg_replace_callback

2002-11-18 Thread Bikeman
Me again. I think this really badly documented in the documentation. I hope this is solved soon. To be more detailed: The preg_replace_callback()-function documentation says it is the same as the preg_replacec()-function, except for the second argument. Apparently, it is not, since it doesn't

RE: [PHP] preg_replace_callback

2002-11-17 Thread Philip Olson
Please make all replies to this ONLY go to php-general, thank you. On Sun, 17 Nov 2002, John W. Holmes wrote: > "callback" should be the name of a function that determines what the > matched pattern will be replaced with. > > Maybe you just need the regular preg_replace(), instead of the on

RE: [PHP] preg_replace_callback

2002-11-17 Thread John W. Holmes
"callback" should be the name of a function that determines what the matched pattern 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,