Annotation of embedaddon/php/tests/lang/string_decimals_001.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: String conversion with multiple decimal points
3: --FILE--
4: <?php
5: function test($str) {
6: echo "\n--> Testing $str:\n";
7: var_dump((int)$str);
8: var_dump((float)$str);
9: var_dump($str > 0);
10: }
11:
12: test("..9");
13: test(".9.");
14: test("9..");
15: test("9.9.");
16: test("9.9.9");
17: ?>
18: ===DONE===
19: --EXPECTF--
20:
21: --> Testing ..9:
22: int(0)
23: float(0)
24: bool(false)
25:
26: --> Testing .9.:
27: int(0)
28: float(0.9)
29: bool(true)
30:
31: --> Testing 9..:
32: int(9)
33: float(9)
34: bool(true)
35:
36: --> Testing 9.9.:
37: int(9)
38: float(9.9)
39: bool(true)
40:
41: --> Testing 9.9.9:
42: int(9)
43: float(9.9)
44: bool(true)
45: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>