mirror of
https://github.com/php/pecl-database-ibm_db2.git
synced 2026-03-23 23:02:16 +01:00
var_dump has differing precision between PHP 7 and 8
This is probably due to the locale-neutral float conversion. var_dump will show an extra 3 digits of precisions varying, but var_export seems to always show the remaining 3 digits. Many of the other conversion functions could have been used instead if we did not want to show the last three digits.
This commit is contained in:
@@ -21,7 +21,8 @@ if ($conn) {
|
||||
$res = db2_exec($conn, "SELECT tz_offset from test1R");
|
||||
|
||||
while ($row = db2_fetch_both($res)) {
|
||||
var_dump($row);
|
||||
echo(var_export($row[0], true) . "\n");
|
||||
echo(var_export($row["TZ_OFFSET"], true) . "\n");
|
||||
}
|
||||
|
||||
// Dropping the test table.
|
||||
@@ -33,9 +34,5 @@ if ($conn) {
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
array(2) {
|
||||
["TZ_OFFSET"]=>
|
||||
float(-2.3399999141693)
|
||||
[0]=>
|
||||
float(-2.3399999141693)
|
||||
}
|
||||
-2.3399999141693115
|
||||
-2.3399999141693115
|
||||
|
||||
Reference in New Issue
Block a user