bootstrap.php 920 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. use Symfony\Polyfill\Php54 as p;
  11. if (PHP_VERSION_ID < 50400) {
  12. if (!function_exists('trait_exists')) {
  13. function trait_exists($class, $autoload = true) { return $autoload && class_exists($class, $autoload) && false; }
  14. }
  15. if (!function_exists('class_uses')) {
  16. function class_uses($class, $autoload = true) { return $autoload && class_exists($class, $autoload) && false; }
  17. }
  18. if (!function_exists('hex2bin')) {
  19. function hex2bin($data) { return p\Php54::hex2bin($data); }
  20. }
  21. if (!function_exists('session_register_shutdown')) {
  22. function session_register_shutdown() { register_shutdown_function('session_write_close'); }
  23. }
  24. }