summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/array_rand_variation4.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/array/array_rand_variation4.phpt')
-rw-r--r--ext/standard/tests/array/array_rand_variation4.phpt16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/standard/tests/array/array_rand_variation4.phpt b/ext/standard/tests/array/array_rand_variation4.phpt
index 74dada0aa0..27f1620003 100644
--- a/ext/standard/tests/array/array_rand_variation4.phpt
+++ b/ext/standard/tests/array/array_rand_variation4.phpt
@@ -1,9 +1,9 @@
--TEST--
-Test array_rand() function : usage variation - with associative arrays for 'input' parameter
+Test array_rand() function : usage variation - with associative arrays for 'input' parameter
--FILE--
<?php
/* Prototype : mixed array_rand(array $input [, int $num_req])
- * Description: Return key/keys for random entry/entries in the array
+ * Description: Return key/keys for random entry/entries in the array
* Source code: ext/standard/array.c
*/
@@ -16,12 +16,12 @@ echo "*** Testing array_rand() : with associative arrays ***\n";
// initialise associative arrays
$asso_arrays = array(
-
+
// array with numeric keys
/*1*/ array(1 => 'one', 2 => 2, 1234567890 => 'big', -1 => 'negative key',
2.3 => 'float key', 0 => "zero key", 0.2 => 'decimal key',
2e2 => 'exp key1', -2e3 => 'negative exp key'),
-
+
// array with string keys
array('one' => 1, "two" => 2.0, "three" => 'three',
'12twelve' => 12.00, "" => 'empty string', " " => "space key"),
@@ -29,7 +29,7 @@ $asso_arrays = array(
// array with hexa values as keys
/*3*/ array(0xabc => 2748, 0x12f => '303', 0xff => "255", -0xff => "-255"),
- // array with octal values as keys
+ // array with octal values as keys
array(0123 => 83, 012 => 10, 010 => "8", -034 => "-28", 0012 => '10'),
// array with bool values as keys
@@ -42,7 +42,7 @@ $asso_arrays = array(
"\t" => "tab as key", "'" => 'single quote as key',
'"' => 'double quote as key', "\0" => "null char as key")
);
-
+
/* looping to test array_rand() function with different arrays having
* different types of keys
*/
@@ -59,10 +59,10 @@ foreach($asso_arrays as $input) {
var_dump( array_rand($input, 1) ); // with $num_req=1
echo"\nWith num_req = 2\n";
var_dump( array_rand($input, 2) ); // with $num_req=2
-
+
$counter++;
} // end of for loop
-
+
echo "Done";
?>