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
7 <<__EntryPoint
>> function main(): void
{
8 echo "*** Testing array_fill_keys() : error conditions ***\n";
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"; }