mirror of
https://github.com/php/php-src.git
synced 2024-12-21 16:00:18 +08:00
33 lines
355 B
PHP
33 lines
355 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";
|
|
?>
|
|
--EXPECT--
|
|
float(394758.39454545)
|
|
float(394758.39454545)
|
|
float(394758.39454545)
|
|
Done
|