1 <?php
2
3 4 5 6 7 8 9 10
11
12 use Symfony\Polyfill\Php56 as p;
13
14 if (PHP_VERSION_ID < 50600) {
15 if (!function_exists('hash_equals')) {
16 function hash_equals($knownString, $userInput) { return p\Php56::hash_equals($knownString, $userInput); }
17 }
18 if (extension_loaded('ldap') && !function_exists('ldap_escape')) {
19 define('LDAP_ESCAPE_FILTER', 1);
20 define('LDAP_ESCAPE_DN', 2);
21
22 function ldap_escape($subject, $ignore = '', $flags = 0) { return p\Php56::ldap_escape($subject, $ignore, $flags); }
23 }
24
25 if (50509 === PHP_VERSION_ID && 4 === PHP_INT_SIZE) {
26
27
28 if (!function_exists('gzopen') && function_exists('gzopen64')) {
29 function gzopen($filename, $mode, $use_include_path = 0) { return gzopen64($filename, $mode, $use_include_path); }
30 }
31 if (!function_exists('gzseek') && function_exists('gzseek64')) {
32 function gzseek($zp, $offset, $whence = SEEK_SET) { return gzseek64($zp, $offset, $whence); }
33 }
34 if (!function_exists('gztell') && function_exists('gztell64')) {
35 function gztell($zp) { return gztell64($zp); }
36 }
37 }
38 }
39