1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
5 * An open source application development framework for PHP 4.3.2 or newer
8 * @author ExpressionEngine Dev Team
9 * @copyright Copyright (c) 2008 - 2009, EllisLab, Inc.
10 * @license http://codeigniter.com/user_guide/license.html
11 * @link http://codeigniter.com
16 // ------------------------------------------------------------------------
19 * Compatibility Functions
21 * Function overrides for older versions of PHP or PHP environments missing
22 * certain extensions / libraries
24 * @package CodeIgniter
25 * @subpackage codeigniter
26 * @category Compatibility Functions
27 * @author ExpressionEngine Development Team
28 * @link http://codeigniter.com/user_guide/
31 // ------------------------------------------------------------------------
34 * PHP versions prior to 5.0 don't support the E_STRICT constant
35 * so we need to explicitly define it otherwise the Exception class
36 * will generate errors when running under PHP 4
39 if ( ! defined('E_STRICT'))
41 define('E_STRICT', 2048);
47 * Determines if a string is comprised only of digits
48 * http://us.php.net/manual/en/function.ctype_digit.php
54 if ( ! function_exists('ctype_digit'))
56 function ctype_digit($str)
58 if ( ! is_string($str) OR $str == '')
63 return ! preg_match('/[^0-9]/', $str);
67 // --------------------------------------------------------------------
72 * Determines if a string is comprised of only alphanumeric characters
73 * http://us.php.net/manual/en/function.ctype-alnum.php
79 if ( ! function_exists('ctype_alnum'))
81 function ctype_alnum($str)
83 if ( ! is_string($str) OR $str == '')
88 return ! preg_match('/[^0-9a-z]/i', $str);
92 /* End of file Compat.php */
93 /* Location: ./system/codeigniter/Compat.php */