Re: [PHP] Return value efficiency question

2004-03-10 Thread messju mohr
On Wed, Mar 10, 2004 at 04:48:06PM +0300, Burhan Khalid wrote: > Kelly Hallman wrote: > >Consider this method: > > > >function xyz() { > >return $this->data = unserialize($this->serial); } > > > > Maybe I'm just being stupid, but wouldn't that simply return true if the > assignment wa

Re: [PHP] Small riddle with classes and references, or bug?

2003-12-22 Thread messju mohr
On Mon, Dec 22, 2003 at 11:57:58AM +0100, rush wrote: > Hello, > > I have a problem understanding following chunk of code. It seems that global > $rme does not remember an reference to $this, but instead it is remembering > null or something like that: > > > class A { > function remembe

Re: [PHP] changing from Apache mod to CGI

2003-10-04 Thread messju mohr
On Sun, Oct 05, 2003 at 05:28:49AM +0800, Jason Wong wrote: > On Sunday 05 October 2003 04:24, messju mohr wrote: > > > the cgi-sapi has a big advantage in a shared hosting environment: > > suexec - your php-scripts run with a distict uid for each customer. > > > >

Re: [PHP] changing from Apache mod to CGI

2003-10-04 Thread messju mohr
On Sun, Oct 05, 2003 at 03:59:21AM +0800, Jason Wong wrote: > On Sunday 05 October 2003 04:47, Cristian Lavaque wrote: > > My webhost announced that it's changing PHP from Apache module to CGI. I > > know nothing about this, so I'd like to know what I should change in my > > scripts so they still r

Re: [PHP] static method and $this

2003-08-14 Thread messju mohr
> Daryl > > -Original Message- > From: messju mohr [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 07, 2003 3:42 AM > To: [EMAIL PROTECTED] > Subject: [PHP] static method and $this > > > hello php-general, > > i found this thread in the mailin

[PHP] static method and $this

2003-08-09 Thread messju mohr
hello php-general, i found this thread in the mailing-list archive: http://marc.theaimsgroup.com/?l=php-general&m=104182777004472&w=2 to summarize: if you call a static method FooClass::foo() from within an object-method (for example: class BarClass { function bar() { Foo::foo(); } }

Re: [PHP] Using eregi_replace()

2003-08-01 Thread messju mohr
On Fri, Aug 01, 2003 at 04:51:38PM +0100, skate wrote: > > > > you could also use different delimiters and write for example: > > '/.*?(hello.*going).*/' or '[.*?(hello.*going).*]' the regular > > expression itself is merely ".*?(hello.*going).*" which matches the > > whole string and replaces it b

Re: [PHP] Using eregi_replace()

2003-08-01 Thread messju mohr
On Fri, Aug 01, 2003 at 11:36:29AM -0400, Anthony Ritter wrote: > However, this works using: > preg_replace() > > . > > $text="blah blah blah hello I must be going blah blah"; > $newtext= preg_replace("!.*?(hello.*going).*!","$1",$text); > echo $newtext; > ?> > ..

Re: [PHP] Using eregi_replace()

2003-08-01 Thread messju mohr
st .* ist greedy so it would match the last hello, not the first one if there is more than one "hello" in the string. > messju mohr wrote: > > >you mean > >$newtext= ereg_replace(".*?(hello.*going).*","\\1",$text); > >?? > > > >

Re: [PHP] Using eregi_replace()

2003-08-01 Thread messju mohr
On Fri, Aug 01, 2003 at 11:25:07AM -0400, Anthony Ritter wrote: > Messju Mohr" <[EMAIL PROTECTED] writes: > > > you mean > > $newtext= ereg_replace(".*?(hello.*going).*","\\1",$text); > > ?? > .. > >

Re: [PHP] Using eregi_replace()

2003-08-01 Thread messju mohr
On Fri, Aug 01, 2003 at 03:13:53PM +, Curt Zirzow wrote: > * Thus wrote messju mohr ([EMAIL PROTECTED]): > > On Fri, Aug 01, 2003 at 10:33:50AM -0400, Anthony Ritter wrote: > > > > i would suggest preg_replace in favour to ereg_replace: > > $newtext= preg_replace(

Re: [PHP] Using eregi_replace()

2003-08-01 Thread messju mohr
On Fri, Aug 01, 2003 at 10:33:50AM -0400, Anthony Ritter wrote: > Using eregi_replace(), is there a way to take out a piece of a sentence - > which has spaces - and then return the new sentence? > > For example, to return the new sentence: > > hello I must be going > > from the original sentence

Re: [PHP] Display question

2003-08-01 Thread messju mohr
On Fri, Aug 01, 2003 at 03:00:23AM -0500, John T. Beresford wrote: > Hi All, > > I'm having a hard time wrapping my head around this. I have a query > that returns the following (Sorted by col2): > > col1 col2 > - > house1Com1 > house2Com1 > house3Com2 > hous