File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
tests /
lang /
string_decimals_001.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:06 2012 UTC (12 years, 5 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
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>