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