mirror of
https://github.com/php/php-src.git
synced 2024-11-28 20:34:29 +08:00
33 lines
357 B
PHP
33 lines
357 B
PHP
--TEST--
|
|
dividing doubles
|
|
--INI--
|
|
precision=14
|
|
--FILE--
|
|
<?php
|
|
|
|
$d1 = 1.1;
|
|
$d2 = 434234.234;
|
|
|
|
$c = $d2 / $d1;
|
|
var_dump($c);
|
|
|
|
$d1 = 1.1;
|
|
$d2 = "434234.234";
|
|
|
|
$c = $d2 / $d1;
|
|
var_dump($c);
|
|
|
|
$d1 = "1.1";
|
|
$d2 = "434234.234";
|
|
|
|
$c = $d2 / $d1;
|
|
var_dump($c);
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
float(394758.39454545)
|
|
float(394758.39454545)
|
|
float(394758.39454545)
|
|
Done
|