mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.2' into PHP-8.3
This commit is contained in:
@@ -220,6 +220,9 @@ case $host_cpu in
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl See https://github.com/php/php-src/issues/14140
|
||||
AX_CHECK_COMPILE_FLAG([-ffp-contract=off], [CFLAGS="$CFLAGS -ffp-contract=off"])
|
||||
|
||||
dnl Mark symbols hidden by default if the compiler (for example, gcc >= 4)
|
||||
dnl supports it. This can help reduce the binary size and startup time.
|
||||
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],
|
||||
|
||||
21
ext/standard/tests/array/gh14140.phpt
Normal file
21
ext/standard/tests/array/gh14140.phpt
Normal file
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
GH-14140: Floating point bug in range operation on Apple Silicon hardware
|
||||
--FILE--
|
||||
<?php
|
||||
/*
|
||||
* This is a problem that occurs not only in Apple silicon, but also in the Arm
|
||||
* processor environment in general, which uses clang as the compiler.
|
||||
*/
|
||||
print_r(range(-0.03, 0.03, 0.01));
|
||||
?>
|
||||
--EXPECT--
|
||||
Array
|
||||
(
|
||||
[0] => -0.03
|
||||
[1] => -0.02
|
||||
[2] => -0.01
|
||||
[3] => 0
|
||||
[4] => 0.01
|
||||
[5] => 0.02
|
||||
[6] => 0.03
|
||||
)
|
||||
Reference in New Issue
Block a user