Revert "make hphpc able to use ini files"
[hiphop-php.git] / hphp / test / zend / bad / ext / standard / tests / array / array_fill_keys_variation1.php
blob461aeef1af5ac81e7ddaa0d830d6d2387dcea777
1 <?php
2 /* Prototype : proto array array_fill_keys(array keys, mixed val)
3 * Description: Create an array using the elements of the first parameter as keys each initialized to val
4 * Source code: ext/standard/array.c
5 * Alias to functions:
6 */
9 echo "*** Testing array_fill_keys() : parameter variations ***\n";
11 $nullVal = null;
12 $simpleStr = "simple";
13 $fp = fopen(__FILE__, "r");
14 $emptyArr = array();
15 $bool = false;
16 $float = 2.4;
18 class classA {
19 public function __toString() { return "Class A object"; }
21 $obj = new classA();
24 echo "\n-- Testing array_fill_keys() function with empty arguments --\n";
25 var_dump( array_fill_keys($emptyArr, $nullVal) );
27 echo "\n-- Testing array_fill_keys() function with keyed array --\n";
28 $keyedArray = array("two" => 2, "strk1" => "strv1", 4, $simpleStr);
29 var_dump( array_fill_keys($keyedArray, $simpleStr) );
31 echo "\n-- Testing array_fill_keys() function with mixed array --\n";
32 $mixedArray = array($fp, $obj, $simpleStr, $emptyArr, 2, $bool, $float);
33 var_dump( array_fill_keys($mixedArray, $simpleStr) );
35 fclose($fp);
36 echo "Done";