1--TEST--
2bcmath lib arguments formatting
3--DESCRIPTION--
41 and 2 argument of bcadd/bcsub/bcmul/bcdiv/bcmod/bcpowmod/bcpow/bccomp (last one works different then others internally);
51 argument of bcsqrt
6All of the name above must be well-formed
7--SKIPIF--
8<?php if(!extension_loaded("bcmath")) print "skip"; ?>
9--FILE--
10<?php
11echo bcadd("1", "2"),"\n";
12echo bcadd("1.1", "2", 2),"\n";
13echo bcadd("", "2", 2),"\n";
14echo bcadd("+0", "2"), "\n";
15echo bcadd("-0", "2"), "\n";
16
17echo bcadd(" 0", "2");
18echo bcadd("1e1", "2");
19echo bcadd("1,1", "2");
20echo bcadd("Hello", "2");
21echo bcadd("1 1", "2");
22echo "\n", "\n";
23
24echo bccomp("1", "2"),"\n";
25echo bccomp("1.1", "2", 2),"\n";
26echo bccomp("", "2"),"\n";
27echo bccomp("+0", "2"), "\n";
28echo bccomp("-0", "2"), "\n";
29
30echo bccomp(" 0", "2");
31echo bccomp("1e1", "2");
32echo bccomp("1,1", "2");
33echo bccomp("Hello", "2");
34echo bccomp("1 1", "2");
35?>
36--EXPECTF--
373
383.10
392.00
402
412
42
43Warning: bcadd(): bcmath function argument is not well-formed in %s on line %d
442
45Warning: bcadd(): bcmath function argument is not well-formed in %s on line %d
462
47Warning: bcadd(): bcmath function argument is not well-formed in %s on line %d
482
49Warning: bcadd(): bcmath function argument is not well-formed in %s on line %d
502
51Warning: bcadd(): bcmath function argument is not well-formed in %s on line %d
522
53
54-1
55-1
56-1
57-1
58-1
59
60Warning: bccomp(): bcmath function argument is not well-formed in %s on line %d
61-1
62Warning: bccomp(): bcmath function argument is not well-formed in %s on line %d
63-1
64Warning: bccomp(): bcmath function argument is not well-formed in %s on line %d
65-1
66Warning: bccomp(): bcmath function argument is not well-formed in %s on line %d
67-1
68Warning: bccomp(): bcmath function argument is not well-formed in %s on line %d
69-1