Skip to content

Commit 1872201

Browse files
committed
pow() tests content beautified
1 parent 6394e41 commit 1872201

File tree

3 files changed

+157
-156
lines changed

3 files changed

+157
-156
lines changed

ext/standard/tests/math/pow_variation1.phpt

Lines changed: 53 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ echo "*** Testing pow() : usage variations ***\n";
1212

1313
//get an unset variable
1414
$unset_var = 10;
15-
unset ($unset_var);
15+
unset($unset_var);
1616

1717
// heredoc string
1818
$heredoc = <<<EOT
@@ -28,68 +28,69 @@ class classA
2828
// get a resource variable
2929
$fp = fopen(__FILE__, "r");
3030

31-
$inputs = array(
32-
// int data
33-
/*1*/ 0,
34-
1,
35-
12345,
36-
-2345,
37-
PHP_INT_MAX,
38-
39-
// float data
40-
/*6*/ 10.5,
41-
-10.5,
42-
12.3456789000e10,
43-
12.3456789000E-10,
44-
.5,
45-
46-
// null data
47-
/*11*/ NULL,
48-
null,
49-
50-
// boolean data
51-
/*13*/ true,
52-
false,
53-
TRUE,
54-
FALSE,
55-
56-
// empty data
57-
/*17*/ "",
58-
'',
59-
array(),
60-
61-
// string data
62-
/*20*/ "abcxyz",
63-
'abcxyz',
64-
$heredoc,
65-
'5.5',
66-
'2',
67-
68-
// object data
69-
/*25*/ new classA(),
70-
71-
// undefined data
72-
/*26*/ @$undefined_var,
73-
74-
// unset data
75-
/*27*/ @$unset_var,
76-
77-
// resource variable
78-
/*28*/ $fp
79-
);
31+
$inputs = [
32+
// int data
33+
/*1*/ 0,
34+
1,
35+
12345,
36+
-2345,
37+
PHP_INT_MAX,
38+
39+
// float data
40+
/*6*/ 10.5,
41+
-10.5,
42+
12.3456789e10,
43+
12.3456789e-10,
44+
0.5,
45+
46+
// null data
47+
/*11*/ null,
48+
null,
49+
50+
// boolean data
51+
/*13*/ true,
52+
false,
53+
true,
54+
false,
55+
56+
// empty data
57+
/*17*/ "",
58+
"",
59+
[],
60+
61+
// string data
62+
/*20*/ "abcxyz",
63+
"abcxyz",
64+
$heredoc,
65+
"5.5",
66+
"2",
67+
68+
// object data
69+
/*25*/ new classA(),
70+
71+
// undefined data
72+
/*26*/ @$undefined_var,
73+
74+
// unset data
75+
/*27*/ @$unset_var,
76+
77+
// resource variable
78+
/*28*/ $fp,
79+
];
8080

8181
// loop through each element of $inputs to check the behaviour of pow()
8282
$iterator = 1;
83-
foreach($inputs as $input) {
83+
foreach ($inputs as $input) {
8484
echo "\n-- Iteration $iterator --\n";
8585
try {
8686
var_dump(pow($input, 3));
8787
} catch (Error $e) {
8888
echo $e->getMessage(), "\n";
8989
}
9090
$iterator++;
91-
};
91+
}
9292
fclose($fp);
93+
9394
?>
9495
--EXPECTF--
9596
*** Testing pow() : usage variations ***

ext/standard/tests/math/pow_variation1_64bit.phpt

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ echo "*** Testing pow() : usage variations ***\n";
1212

1313
//get an unset variable
1414
$unset_var = 10;
15-
unset ($unset_var);
15+
unset($unset_var);
1616

1717
// heredoc string
1818
$heredoc = <<<EOT
@@ -28,67 +28,67 @@ class classA
2828
// get a resource variable
2929
$fp = fopen(__FILE__, "r");
3030

31-
$inputs = array(
32-
// int data
33-
/*1*/ 0,
34-
1,
35-
12345,
36-
-2345,
37-
PHP_INT_MAX,
38-
39-
// float data
40-
/*6*/ 10.5,
41-
-10.5,
42-
12.3456789000e10,
43-
12.3456789000E-10,
44-
.5,
45-
46-
// null data
47-
/*11*/ NULL,
48-
null,
49-
50-
// boolean data
51-
/*13*/ true,
52-
false,
53-
TRUE,
54-
FALSE,
55-
56-
// empty data
57-
/*17*/ "",
58-
'',
59-
array(),
60-
61-
// string data
62-
/*20*/ "abcxyz",
63-
'abcxyz',
64-
$heredoc,
65-
'10.5',
66-
'2',
67-
68-
// object data
69-
/*25*/ new classA(),
70-
71-
// undefined data
72-
/*26*/ @$undefined_var,
73-
74-
// unset data
75-
/*27*/ @$unset_var,
76-
77-
// resource variable
78-
/*28*/ $fp
79-
);
31+
$inputs = [
32+
// int data
33+
/*1*/ 0,
34+
1,
35+
12345,
36+
-2345,
37+
PHP_INT_MAX,
38+
39+
// float data
40+
/*6*/ 10.5,
41+
-10.5,
42+
12.3456789e10,
43+
12.3456789e-10,
44+
0.5,
45+
46+
// null data
47+
/*11*/ null,
48+
null,
49+
50+
// boolean data
51+
/*13*/ true,
52+
false,
53+
true,
54+
false,
55+
56+
// empty data
57+
/*17*/ "",
58+
"",
59+
[],
60+
61+
// string data
62+
/*20*/ "abcxyz",
63+
"abcxyz",
64+
$heredoc,
65+
"10.5",
66+
"2",
67+
68+
// object data
69+
/*25*/ new classA(),
70+
71+
// undefined data
72+
/*26*/ @$undefined_var,
73+
74+
// unset data
75+
/*27*/ @$unset_var,
76+
77+
// resource variable
78+
/*28*/ $fp,
79+
];
8080

8181
// loop through each element of $inputs to check the behaviour of pow()
8282
$iterator = 1;
83-
foreach($inputs as $input) {
83+
foreach ($inputs as $input) {
8484
echo "\n-- Iteration $iterator --\n";
8585
try {
8686
var_dump(pow($input, 3));
8787
} catch (Error $e) {
8888
echo $e->getMessage(), "\n";
8989
}
9090
$iterator++;
91-
};
91+
}
9292
fclose($fp);
9393
?>
9494
--EXPECT--

ext/standard/tests/math/pow_variation2.phpt

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ echo "*** Testing pow() : usage variations ***\n";
88

99
//get an unset variable
1010
$unset_var = 10;
11-
unset ($unset_var);
11+
unset($unset_var);
1212

1313
// heredoc string
1414
$heredoc = <<<EOT
@@ -24,67 +24,67 @@ class classA
2424
// get a resource variable
2525
$fp = fopen(__FILE__, "r");
2626

27-
$inputs = array(
28-
// int data
29-
/*1*/ 0,
30-
1,
31-
12345,
32-
-2345,
33-
PHP_INT_MAX,
34-
35-
// float data
36-
/*6*/ 2.5,
37-
-2.5,
38-
12.3456789000e10,
39-
12.3456789000E-10,
40-
.5,
41-
42-
// null data
43-
/*11*/ NULL,
44-
null,
45-
46-
// boolean data
47-
/*13*/ true,
48-
false,
49-
TRUE,
50-
FALSE,
51-
52-
// empty data
53-
/*17*/ "",
54-
'',
55-
array(),
56-
57-
// string data
58-
/*20*/ "abcxyz",
59-
'abcxyz',
60-
$heredoc,
61-
'5.5',
62-
'2',
63-
64-
// object data
65-
/*25*/ new classA(),
66-
67-
// undefined data
68-
/*26*/ @$undefined_var,
69-
70-
// unset data
71-
/*27*/ @$unset_var,
72-
73-
// resource variable
74-
/*28*/ $fp
75-
);
27+
$inputs = [
28+
// int data
29+
/*1*/ 0,
30+
1,
31+
12345,
32+
-2345,
33+
PHP_INT_MAX,
34+
35+
// float data
36+
/*6*/ 2.5,
37+
-2.5,
38+
12.3456789e10,
39+
12.3456789e-10,
40+
0.5,
41+
42+
// null data
43+
/*11*/ null,
44+
null,
45+
46+
// boolean data
47+
/*13*/ true,
48+
false,
49+
true,
50+
false,
51+
52+
// empty data
53+
/*17*/ "",
54+
"",
55+
[],
56+
57+
// string data
58+
/*20*/ "abcxyz",
59+
"abcxyz",
60+
$heredoc,
61+
"5.5",
62+
"2",
63+
64+
// object data
65+
/*25*/ new classA(),
66+
67+
// undefined data
68+
/*26*/ @$undefined_var,
69+
70+
// unset data
71+
/*27*/ @$unset_var,
72+
73+
// resource variable
74+
/*28*/ $fp,
75+
];
7676

7777
// loop through each element of $inputs to check the behaviour of pow()
7878
$iterator = 1;
79-
foreach($inputs as $input) {
79+
foreach ($inputs as $input) {
8080
echo "\n-- Iteration $iterator --\n";
8181
try {
8282
var_dump(pow(20.3, $input));
8383
} catch (Error $e) {
8484
echo $e->getMessage(), "\n";
8585
}
8686
$iterator++;
87-
};
87+
}
8888
fclose($fp);
8989
?>
9090
--EXPECT--

0 commit comments

Comments
 (0)