bootstrap.php 981 B

12345678910111213141516171819202122232425262728293031
  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\Php73 as p;
  11. if (PHP_VERSION_ID < 70300) {
  12. if (!function_exists('is_countable')) {
  13. function is_countable($var) { return is_array($var) || $var instanceof Countable || $var instanceof ResourceBundle || $var instanceof SimpleXmlElement; }
  14. }
  15. if (!function_exists('hrtime')) {
  16. p\Php73::$startAt = (int) microtime(true);
  17. function hrtime($asNum = false) { return p\Php73::hrtime($asNum); }
  18. }
  19. if (!function_exists('array_key_first')) {
  20. function array_key_first(array $array) { foreach ($array as $key => $value) { return $key; } }
  21. }
  22. if (!function_exists('array_key_last')) {
  23. function array_key_last(array $array) { end($array); return key($array); }
  24. }
  25. }