summaryrefslogtreecommitdiffstats
path: root/system/core/compat/standard.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-12-14 15:14:13 +0100
committerAndrey Andreev <narf@devilix.net>2016-12-14 15:14:13 +0100
commit24c866628d0ce5463d7e8b4eba512fa9e7752dfd (patch)
tree39d65288647ecaae09e2b9bc6a15e34e53f7d7d4 /system/core/compat/standard.php
parent26313bddee1fb67af10141671a47bbe703a025fd (diff)
Drop all PHP 5.3-related code
Diffstat (limited to 'system/core/compat/standard.php')
-rw-r--r--system/core/compat/standard.php48
1 files changed, 0 insertions, 48 deletions
diff --git a/system/core/compat/standard.php b/system/core/compat/standard.php
index 6b7caa485..ca5046e56 100644
--- a/system/core/compat/standard.php
+++ b/system/core/compat/standard.php
@@ -132,51 +132,3 @@ if ( ! function_exists('array_column'))
return $result;
}
}
-
-// ------------------------------------------------------------------------
-
-if (is_php('5.4'))
-{
- return;
-}
-
-// ------------------------------------------------------------------------
-
-if ( ! function_exists('hex2bin'))
-{
- /**
- * hex2bin()
- *
- * @link http://php.net/hex2bin
- * @param string $data
- * @return string
- */
- function hex2bin($data)
- {
- if (in_array($type = gettype($data), array('array', 'double', 'object', 'resource'), TRUE))
- {
- if ($type === 'object' && method_exists($data, '__toString'))
- {
- $data = (string) $data;
- }
- else
- {
- trigger_error('hex2bin() expects parameter 1 to be string, '.$type.' given', E_USER_WARNING);
- return NULL;
- }
- }
-
- if (strlen($data) % 2 !== 0)
- {
- trigger_error('Hexadecimal input string must have an even length', E_USER_WARNING);
- return FALSE;
- }
- elseif ( ! preg_match('/^[0-9a-f]*$/i', $data))
- {
- trigger_error('Input string must be hexadecimal string', E_USER_WARNING);
- return FALSE;
- }
-
- return pack('H*', $data);
- }
-}