File tree Expand file tree Collapse file tree 3 files changed +51
-0
lines changed Expand file tree Collapse file tree 3 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,19 @@ foreach ($nums as $num) {
27
27
echo $ num ."\n" ;
28
28
echo '=> ' .bcceil ($ num )."\n\n" ;
29
29
}
30
+
31
+ echo "========== value error ========== \n" ;
32
+ try {
33
+ bcceil ('hoge ' );
34
+ } catch (Throwable $ e ) {
35
+ echo $ e ->getMessage ()."\n" ;
36
+ }
37
+
38
+ try {
39
+ bcceil ('0.00.1 ' );
40
+ } catch (Throwable $ e ) {
41
+ echo $ e ->getMessage ()."\n" ;
42
+ }
30
43
?>
31
44
--EXPECT--
32
45
0
@@ -76,3 +89,7 @@ foreach ($nums as $num) {
76
89
77
90
-100000.000000000000000000000000000000000000000001
78
91
=> -100000
92
+
93
+ ========== value error ==========
94
+ bcceil(): Argument #1 ($num) is not well-formed
95
+ bcceil(): Argument #1 ($num) is not well-formed
Original file line number Diff line number Diff line change @@ -27,6 +27,19 @@ foreach ($nums as $num) {
27
27
echo $ num ."\n" ;
28
28
echo '=> ' .bcfloor ($ num )."\n\n" ;
29
29
}
30
+
31
+ echo "========== value error ========== \n" ;
32
+ try {
33
+ bcfloor ('hoge ' );
34
+ } catch (Throwable $ e ) {
35
+ echo $ e ->getMessage ()."\n" ;
36
+ }
37
+
38
+ try {
39
+ bcfloor ('0.00.1 ' );
40
+ } catch (Throwable $ e ) {
41
+ echo $ e ->getMessage ()."\n" ;
42
+ }
30
43
?>
31
44
--EXPECT--
32
45
0
@@ -76,3 +89,7 @@ foreach ($nums as $num) {
76
89
77
90
-100000.000000000000000000000000000000000000000001
78
91
=> -100001
92
+
93
+ ========== value error ==========
94
+ bcfloor(): Argument #1 ($num) is not well-formed
95
+ bcfloor(): Argument #1 ($num) is not well-formed
Original file line number Diff line number Diff line change @@ -170,6 +170,19 @@ foreach ($modes as $mode) {
170
170
}
171
171
echo "\n" ;
172
172
}
173
+
174
+ echo "========== value error ========== \n" ;
175
+ try {
176
+ bcround ('hoge ' );
177
+ } catch (Throwable $ e ) {
178
+ echo $ e ->getMessage ()."\n" ;
179
+ }
180
+
181
+ try {
182
+ bcround ('0.00.1 ' );
183
+ } catch (Throwable $ e ) {
184
+ echo $ e ->getMessage ()."\n" ;
185
+ }
173
186
?>
174
187
--EXPECT--
175
188
========== early return ==========
@@ -825,3 +838,7 @@ foreach ($modes as $mode) {
825
838
[-0.0005, 3] => -0.001
826
839
[-0.000500, 3] => -0.001
827
840
[-0.000501, 3] => -0.001
841
+
842
+ ========== value error ==========
843
+ bcround(): Argument #1 ($num) is not well-formed
844
+ bcround(): Argument #1 ($num) is not well-formed
You can’t perform that action at this time.
0 commit comments