0
0

bootstrap.php 1011 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($value) { return is_array($value) || $value instanceof Countable || $value instanceof ResourceBundle || $value instanceof SimpleXmlElement; }
  16. }
  17. if (!function_exists('hrtime')) {
  18. require_once __DIR__.'/Php73.php';
  19. p\Php73::$startAt = (int) microtime(true);
  20. function hrtime($as_number = false) { return p\Php73::hrtime($as_number); }
  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) { return key(array_slice($array, -1, 1, true)); }
  27. }