Adding PHP5 constant ((bool)phpversion() > 5)

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3371 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2006-08-06 18:00:49 +00:00
parent 26977195c3
commit c9652ffaaa
2 changed files with 4 additions and 1 deletions

View file

@ -26,6 +26,9 @@
* @lastmodified $Date$ * @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License * @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/ */
if (!defined('PHP5')) {
define ('PHP5', (bool)phpversion() > 5);
}
/** /**
* Configuration, directory layout and standard libraries * Configuration, directory layout and standard libraries
*/ */

View file

@ -35,7 +35,7 @@
* Load the interface class based on the version of PHP. * Load the interface class based on the version of PHP.
* *
*/ */
if (phpversion() < 5) { if (PHP5) {
require(LIBS . 'overloadable_php4.php'); require(LIBS . 'overloadable_php4.php');
} else { } else {
require(LIBS . 'overloadable_php5.php'); require(LIBS . 'overloadable_php5.php');