remove array_multisort and convert array_multisortN to use inout
[hiphop-php.git] / hphp / test / zend / good / ext / standard / tests / array / array_fill_keys_error.php
blob2a639d0e4c2c519869b6d733e6bf920006e15c49
1 <?hh
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 */
7 <<__EntryPoint>> function main(): void {
8 echo "*** Testing array_fill_keys() : error conditions ***\n";
10 $keys = array(1, 2);
11 $val = 1;
12 $extra_arg = 10;
14 echo "\n-- Testing array_fill_keys() function with more than expected no. of arguments --\n";
15 try { var_dump( array_fill_keys($keys, $val, $extra_arg) ); } catch (Exception $e) { echo "\n".'Warning: '.$e->getMessage().' in '.__FILE__.' on line '.__LINE__."\n"; }
17 echo "\n-- Testing array_fill_keys() function with less than expected no. of arguments --\n";
18 try { var_dump( array_fill_keys($keys) ); } catch (Exception $e) { echo "\n".'Warning: '.$e->getMessage().' in '.__FILE__.' on line '.__LINE__."\n"; }
20 echo "\n-- Testing array_fill_keys() function with no arguments --\n";
21 try { var_dump( array_fill_keys() ); } catch (Exception $e) { echo "\n".'Warning: '.$e->getMessage().' in '.__FILE__.' on line '.__LINE__."\n"; }
23 echo "Done";