Deleted Added
full compact
array_fill_keys_error.phpt (3e94ce6a) array_fill_keys_error.phpt (04145dc2)
1tree 3e94ce6a:
1--TEST--
2Test array_fill_keys() function : error conditions
3--FILE--
4<?php
5/* Prototype : proto array array_fill_keys(array keys, mixed val)
6 * Description: Create an array using the elements of the first parameter as keys each initialized to val
7 * Source code: ext/standard/array.c
8 * Alias to functions:
9 */
2
10
3.gdbinit
4CODING_STANDARDS
5CREDITS
6ChangeLog
7ChangeLog.1999.gz
8ChangeLog.2000.gz
9ChangeLog.2001.gz
10ChangeLog.2002.gz
11ChangeLog.2003.gz
12ChangeLog.2004.gz
13EXTENSIONS
14INSTALL
15LICENSE
16Makefile.frag
17Makefile.gcov
18Makefile.global
19NEWS
20README.CVS-RULES
21README.EXTENSIONS
22README.EXT_SKEL
23README.PARAMETER_PARSING_API
24README.PHP4-TO-PHP5-THIN-CHANGES
25README.QNX
26README.SELF-CONTAINED-EXTENSIONS
27README.STREAMS
28README.SUBMITTING_PATCH
29README.TESTING
30README.TESTING2
31README.UNIX-BUILD-SYSTEM
32README.UPDATE_5_2
33README.WIN32-BUILD-SYSTEM
34README.Zeus
35README.input_filter
36TODO
37TODO-5.1
38TODO-PHP5
39UPGRADING
40acconfig.h.in
41acinclude.m4
42buildconf
43buildconf.bat
44config.guess
45config.sub
46configure.in
47cvsclean
48cvsclean.bat
49footer
50genfiles
51header
52ltmain.sh
53makedist
54makerpm
55php.gif
56php.ini-dist
57php.ini-recommended
58php5.spec.in
59run-tests.php
60server-tests-config.php
61server-tests.php
62snapshot
63stamp-h.in
64stub.c
11echo "*** Testing array_fill_keys() : error conditions ***\n";
12
13$keys = array(1, 2);
14$val = 1;
15$extra_arg = 10;
16
17echo "\n-- Testing array_fill_keys() function with more than expected no. of arguments --\n";
18var_dump( array_fill_keys($keys, $val, $extra_arg) );
19
20echo "\n-- Testing array_fill_keys() function with less than expected no. of arguments --\n";
21var_dump( array_fill_keys($keys) );
22
23echo "\n-- Testing array_fill_keys() function with no arguments --\n";
24var_dump( array_fill_keys() );
25
26echo "Done";
27?>
28--EXPECTF--
29*** Testing array_fill_keys() : error conditions ***
30
31-- Testing array_fill_keys() function with more than expected no. of arguments --
32
33Warning: array_fill_keys() expects exactly 2 parameters, 3 given in %sarray_fill_keys_error.php on line %d
34NULL
35
36-- Testing array_fill_keys() function with less than expected no. of arguments --
37
38Warning: array_fill_keys() expects exactly 2 parameters, 1 given in %sarray_fill_keys_error.php on line %d
39NULL
40
41-- Testing array_fill_keys() function with no arguments --
42
43Warning: array_fill_keys() expects exactly 2 parameters, 0 given in %sarray_fill_keys_error.php on line %d
44NULL
45Done