2.4.1-dev
[phpmyadmin/crack.git] / libraries / defines_php.lib.php3
blob6ceea85cca470d276a1db8d68a3e99e49d5f2070
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
5 /**
6 * DEFINES VARIABLES & CONSTANTS
7 * Overview:
8 * PMA_VERSION (string) - phpMyAdmin version string
9 * PMA_PHP_INT_VERSION (int) - eg: 30017 instead of 3.0.17 or
10 * 40006 instead of 4.0.6RC3
11 * PMA_IS_WINDOWS (bool) - mark if phpMyAdmin running on windows
12 * server
14 // phpMyAdmin release
15 if (!defined('PMA_VERSION')) {
16 define('PMA_VERSION', '2.4.1-dev');
19 // php version
20 if (!defined('PMA_PHP_INT_VERSION')) {
21 if (!ereg('([0-9]{1,2}).([0-9]{1,2}).([0-9]{1,2})', phpversion(), $match)) {
22 $result = ereg('([0-9]{1,2}).([0-9]{1,2})', phpversion(), $match);
24 if (isset($match) && !empty($match[1])) {
25 if (!isset($match[2])) {
26 $match[2] = 0;
28 if (!isset($match[3])) {
29 $match[3] = 0;
31 define('PMA_PHP_INT_VERSION', (int)sprintf('%d%02d%02d', $match[1], $match[2], $match[3]));
32 unset($match);
33 } else {
34 define('PMA_PHP_INT_VERSION', 0);
36 define('PMA_PHP_STR_VERSION', phpversion());
39 // Whether the os php is running on is windows or not
40 if (!defined('PMA_IS_WINDOWS')) {
41 if (defined('PHP_OS') && eregi('win', PHP_OS)) {
42 define('PMA_IS_WINDOWS', 1);
43 } else {
44 define('PMA_IS_WINDOWS', 0);
48 // $__PMA_DEFINES_PHP_LIB__