4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 use Symfony\Polyfill\Php54 as p;
14 if (PHP_VERSION_ID < 50400) {
15 if (!function_exists('trait_exists')) {
16 function trait_exists($class, $autoload = true) { return $autoload && class_exists($class, $autoload) && false; }
18 if (!function_exists('class_uses')) {
19 function class_uses($class, $autoload = true)
21 if (is_object($class) || class_exists($class, $autoload) || interface_exists($class, false)) {
28 if (!function_exists('hex2bin')) {
29 function hex2bin($data) { return p\Php54::hex2bin($data); }
31 if (!function_exists('session_register_shutdown')) {
32 function session_register_shutdown() { register_shutdown_function('session_write_close'); }