Re: in-line function?
| From: | Donny Lee | Date: | Tue, 22 Jul 2003 02:57:42 +0000 |
| Subject: | Re: in-line function? | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-29378@lists.php.net to get a copy of this message | ||
Leif K-Brooks wrote:
i'm not quite sure, so correct me if i'm wrong. in C++ definition, a length() statement, in this example, will be replaced directly by the value of $this->varLength at runtime, instead of passing control to the length() function, returning the value, exit and then returning control to up process. -- // DonnyOhhh.. sorry for that. it's quite simple, i'm wondering if we can have something like those in-line functions in C++: class someCLASS {What would be the difference (besides putting the word "inline" in front of the function)?var $varLength; // .... other stuff.... inline function length() { return $this->varLength; }} i expect it will make PHP script speed up a bit, coding easier, etc... but not sure it will do or not. :)