Re: RFC: mark functions as const for possible optimizations

From: Date: Fri, 14 Sep 2007 18:42:20 +0000
Subject: Re: RFC: mark functions as const for possible optimizations
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-32328@lists.php.net to get a copy of this message
Nuno Lopes wrote: My proposal is the following: some functions when fed with constant arguments always return a constant value, too. e.g.: strlen('abcd') === 4. wouldn't that be called "deterministic" and not "const"?
yeah, exactly. I was missing the correct wording. (btw, appart of being deterministic, the function shouldn't have any side-effect). Nuno

« previous php.internals (#32328) next »