[TYPO3-core] phpversion() vs PHP_VERSION
Michael Stucki
michael at typo3.org
Fri Jun 2 19:53:22 CEST 2006
Hi Karsten,
> On Friday 02 June 2006 15:43, Martin Kutschker wrote:
> > Which one to use? We use both methods in the Core. Is one of them
> > preferred or has a (dis)advantage over the other?
>
> Accessing a cosntant should be faster than calling a function, so I'd vote
> for PHP_VERSION.
>
> Ic checked with the manual, and both are available in all PHP versions, it
> seems.
I think Bernhard once made a little performance test and found out that the
constants are slower if they are first checked through isset(). However, in
these cases we can just depend on those to be set, so the check is not
needed.
Regards, michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060602/ee449645/attachment.pgp
More information about the TYPO3-team-core
mailing list