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