summaryrefslogtreecommitdiff
path: root/ext/standard/tests/strings/printf_variation2.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/strings/printf_variation2.phpt')
-rw-r--r--ext/standard/tests/strings/printf_variation2.phpt28
1 files changed, 14 insertions, 14 deletions
diff --git a/ext/standard/tests/strings/printf_variation2.phpt b/ext/standard/tests/strings/printf_variation2.phpt
index be66ad8fca..8e7d5ec910 100644
--- a/ext/standard/tests/strings/printf_variation2.phpt
+++ b/ext/standard/tests/strings/printf_variation2.phpt
@@ -24,7 +24,7 @@ class sample
{
public function __toString() {
return "Object";
- }
+ }
}
// creating a file resource
@@ -38,48 +38,48 @@ $values = array(
1,
12345,
-2345,
-
+
// float data
/*5*/ 10.5,
-10.5,
10.1234567e10,
10.7654321E-10,
.5,
-
+
// array data
/*10*/ array(),
array(0),
array(1),
array(1, 2),
array('color' => 'red', 'item' => 'pen'),
-
+
// null data
/*15*/ NULL,
null,
-
+
// boolean data
/*17*/ true,
false,
TRUE,
FALSE,
-
+
// empty data
/*21*/ "",
'',
-
+
// string data
/*23*/ "string",
'string',
-
+
// object data
/*25*/ new sample(),
-
+
// undefined data
/*26*/ @$undefined_var,
-
+
// unset data
/*27*/ @$unset_var,
-
+
// resource data
/*28*/ $file_handle
);
@@ -89,7 +89,7 @@ $values = array(
$count = 1;
foreach($values as $value) {
echo "\n-- Iteration $count --\n";
-
+
// with two arguments
$result = printf($format, $value);
echo "\n";
@@ -99,8 +99,8 @@ foreach($values as $value) {
$result = printf($format, $value, $arg2);
echo "\n";
var_dump($result);
-
- $count++;
+
+ $count++;
};
// closing the resource