Jump to content

2 Variables from a function


Adam W

Recommended Posts

Not like that you couldn't. You need to define the class first and its alot of overhead for no gain really.

 

I should note that it does work with PHP 4.x, just tested.

 

I am unsure with PHP 5, so you could be right given the right version of PHP.

 

But that does work with PHP 4.

 

Whether or not it is considered "correct" or "good" programming I guess is something else...

Sorry frost, I take that back. Learn something everyday. Just tested it on 5.2.2 and yeah.. its works.

 

I could have swarn theat would have generated a 'method called on a non object' or whatever error that is.

 

I used to think that too, until one day I tried it out. My life has not been the same since ^.- =)

 

But as I stated, unsure if it is good programming or not, as PHP may decide that it should throw an error one day. But as far as I know it works and there is no less efficiency or anything and it works pretty nicely

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.