1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 02:02:32 +01:00
Files
archived-php-src/ext/opcache/tests/jit/array_elem_002.phpt
Dmitry Stogov 23c5a6fd16 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fix exception handling when next array element is already occupied
2021-11-29 21:57:29 +03:00

21 lines
601 B
PHP

--TEST--
Occupied next element
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
--FILE--
<?php
$float = 100000000000000000000000000000000000000;
$string_float= PHP_INT_MAX;
$a = [$float => 'a', $string_float => 'b', 'c', 'd'];
?>
--EXPECTF--
Deprecated: Implicit conversion from float 1.0E+38 to int loses precision 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