/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/opcache/tests/jit/array_elem_002.phpt
19 строк
573 B
Gina Peter Banyard
core: Warn when non-representable floats are coerced to int (#19760)
22 сен 2025, 01:53
Не верифицирован
22 сен 2025, 01:53
b4ed215
Код
Авторство
О чём код?
--TEST-- Occupied next element --INI-- opcache.enable=1 opcache.enable_cli=1 opcache.file_update_protection=0 --FILE-- <?php $float = 100000000000000000000000000000000000000; $string_float= PHP_INT_MAX; $a = [$float => 'a', $string_float => 'b', 'c', 'd']; ?> --EXPECTF-- Warning: The float 1.0E+38 is not representable as an int, cast occurred in %sarray_elem_002.php on line 4 Fatal error: Uncaught Error: Cannot add element to the array as the next element is already occupied in %sarray_elem_002.php:4 Stack trace: #0 {main} thrown in %sarray_elem_002.php on line 4