Resources
2 years ago
LICENSE
2 years ago
Php73.php
1 year ago
README.md
2 years ago
bootstrap.php
2 years ago
bootstrap.php
45 lines
| 1 | <?php |
| 2 | |
| 3 | namespace { |
| 4 | /* |
| 5 | * This file is part of the Symfony package. |
| 6 | * |
| 7 | * (c) Fabien Potencier <fabien@symfony.com> |
| 8 | * |
| 9 | * For the full copyright and license information, please view the LICENSE |
| 10 | * file that was distributed with this source code. |
| 11 | */ |
| 12 | use Symfony\Polyfill\Php73 as p; |
| 13 | if (\PHP_VERSION_ID >= 70300) { |
| 14 | return; |
| 15 | } |
| 16 | if (!\function_exists('is_countable')) { |
| 17 | function is_countable($value) |
| 18 | { |
| 19 | return \is_array($value) || $value instanceof \Countable || $value instanceof \ResourceBundle || $value instanceof \SimpleXmlElement; |
| 20 | } |
| 21 | } |
| 22 | if (!\function_exists('hrtime')) { |
| 23 | require_once __DIR__ . '/Php73.php'; |
| 24 | p\Php73::$startAt = (int) \microtime(\true); |
| 25 | function hrtime($as_number = \false) |
| 26 | { |
| 27 | return p\Php73::hrtime($as_number); |
| 28 | } |
| 29 | } |
| 30 | if (!\function_exists('array_key_first')) { |
| 31 | function array_key_first(array $array) |
| 32 | { |
| 33 | foreach ($array as $key => $value) { |
| 34 | return $key; |
| 35 | } |
| 36 | } |
| 37 | } |
| 38 | if (!\function_exists('array_key_last')) { |
| 39 | function array_key_last(array $array) |
| 40 | { |
| 41 | return \key(\array_slice($array, -1, 1, \true)); |
| 42 | } |
| 43 | } |
| 44 | } |
| 45 |