4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 PHP: new and &new
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
Hertzsprung
WebHelper
WebHelper


Joined: 30 Jul 2002
Posts: 56
Location: UK

PostPosted: Tue Mar 25, 2003 10:18 am (14 years, 6 months ago) Reply with QuoteBack to Top

What is the difference between new Foo() and &new Foo()?

I was having trouble with data initialised after object1 construction, passing object1 (by reference, or so I thought) to object2. Then object2 calls object1's method, which sees the instance data uninitialised Neutral
OfflineView User's ProfileFind all posts by HertzsprungSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Sun May 04, 2003 12:59 pm (14 years, 5 months ago) Reply with QuoteBack to Top

Sorry about the long reply - you've probably already found out, but never mind Sad.

Here's what I found on the subject, after a somewhat painful search, since PHP's search engine (htdig if I'm not mistaken) ignores the & character:

http://www.php.net/manual/en/language.references.whatdo.php

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
SfCommand
Senior WebHelper
Senior WebHelper


Joined: 10 Nov 2002
Posts: 143
Location: UK

PostPosted: Sun May 04, 2003 4:15 pm (14 years, 5 months ago) Reply with QuoteBack to Top

Yes, php does use htdig as a search engine Smile

________________________________
Miguel

http://community.34sp.com
http://www.miguel.me.uk | http://www.sfcommand.co.uk | http://www.ssdg.org.uk
OfflineView User's ProfileFind all posts by SfCommandSend Personal MessageVisit Poster's Website
Hertzsprung
WebHelper
WebHelper


Joined: 30 Jul 2002
Posts: 56
Location: UK

PostPosted: Sat May 31, 2003 9:47 am (14 years, 4 months ago) Reply with QuoteBack to Top

Daniel wrote:
Sorry about the long reply - you've probably already found out, but never mind Sad.

Here's what I found on the subject, after a somewhat painful search, since PHP's search engine (htdig if I'm not mistaken) ignores the & character:

http://www.php.net/manual/en/language.references.whatdo.php


Hmm, okay. So all the time I'm not using =& , I'm wasting CPU time and memory making copies of objects all over the place? No wonder my code is so slow Razz
OfflineView User's ProfileFind all posts by HertzsprungSend Personal MessageVisit Poster's Website
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.052785 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme