summaryrefslogtreecommitdiff
path: root/ext/standard/tests/general_functions/is_numeric.phpt
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2018-10-14 15:37:22 +0200
committerPeter Kokot <peterkokot@gmail.com>2018-10-14 19:43:12 +0200
commit7af945e271d042a4991c9510f78b6ff7ac43ac34 (patch)
tree31d3b7a69f017cd532c5fe31ce1664d426384f82 /ext/standard/tests/general_functions/is_numeric.phpt
parentafd534f1634e9a5d631afac39a9c9b09b1ba8b33 (diff)
downloadphp-git-7af945e271d042a4991c9510f78b6ff7ac43ac34.tar.gz
Trim trailing whitespace in *.phpt
Diffstat (limited to 'ext/standard/tests/general_functions/is_numeric.phpt')
-rw-r--r--ext/standard/tests/general_functions/is_numeric.phpt36
1 files changed, 18 insertions, 18 deletions
diff --git a/ext/standard/tests/general_functions/is_numeric.phpt b/ext/standard/tests/general_functions/is_numeric.phpt
index 415ce069e9..32fb8f3094 100644
--- a/ext/standard/tests/general_functions/is_numeric.phpt
+++ b/ext/standard/tests/general_functions/is_numeric.phpt
@@ -3,11 +3,11 @@ Test is_numeric() function
--FILE--
<?php
/* Prototype: bool is_numeric ( mixed $var );
- * Description: Finds whether a variable is a number or a numeric string
+ * Description: Finds whether a variable is a number or a numeric string
*/
echo "*** Testing is_numeric() with valid numeric values ***\n";
-// different valid numeric vlaues
+// different valid numeric vlaues
$numerics = array(
0,
1,
@@ -58,15 +58,15 @@ $numerics = array(
//0x1111111111111111111111,
-0x1111111,
+0x6698319,
- 01000000000000000000000,
+ 01000000000000000000000,
0123,
0345,
- -0200001,
- -0200001.7,
- 0200001.7,
- +0200001,
- +0200001.7,
- +0200001.7,
+ -0200001,
+ -0200001.7,
+ 0200001.7,
+ +0200001,
+ +0200001.7,
+ +0200001.7,
2.00000000000000000000001, // a float value with more precision points
"1", // numeric in the form of string
"-1",
@@ -87,7 +87,7 @@ $numerics = array(
'-0123',
'+0123'
);
-/* loop to check that is_numeric() recognizes different
+/* loop to check that is_numeric() recognizes different
numeric values, expected output: bool(true) */
$loop_counter = 1;
foreach ($numerics as $num ) {
@@ -105,13 +105,13 @@ $dfp = opendir ( dirname(__FILE__) );
$unset_var = 10.5;
unset ($unset_var);
-// other types in a array
+// other types in a array
$not_numerics = array(
"0x80001",
- "-0x80001",
- "+0x80001",
+ "-0x80001",
+ "+0x80001",
"-0x80001.5",
- "0x80001.5",
+ "0x80001.5",
new stdclass, // object
$fp, // resource
$dfp,
@@ -126,7 +126,7 @@ $not_numerics = array(
"20 test",
"3.6test",
"1,000",
- "NULL",
+ "NULL",
"true",
true,
NULL,
@@ -137,7 +137,7 @@ $not_numerics = array(
@$unset_var, // unset variable
@$undefined_var
);
-/* loop through the $not_numerics to see working of
+/* loop through the $not_numerics to see working of
is_numeric() on non numeric values, expected output: bool(false) */
$loop_counter = 1;
foreach ($not_numerics as $type ) {
@@ -149,9 +149,9 @@ echo "\n*** Testing error conditions ***\n";
//Zero argument
var_dump( is_numeric() );
-//arguments more than expected
+//arguments more than expected
var_dump( is_numeric("10", "20") );
-
+
echo "Done\n";
// close the resources used