diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-14 05:42:27 +0000 |
---|---|---|
committer | <> | 2013-04-03 16:25:08 +0000 |
commit | c4dd7a1a684490673e25aaf4fabec5df138854c4 (patch) | |
tree | 4d57c44caae4480efff02b90b9be86f44bf25409 /ext/standard/tests/array/array_fill_keys.phpt | |
download | php2-master.tar.gz |
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/standard/tests/array/array_fill_keys.phpt')
-rw-r--r-- | ext/standard/tests/array/array_fill_keys.phpt | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/ext/standard/tests/array/array_fill_keys.phpt b/ext/standard/tests/array/array_fill_keys.phpt new file mode 100644 index 0000000..b4d5168 --- /dev/null +++ b/ext/standard/tests/array/array_fill_keys.phpt @@ -0,0 +1,44 @@ +--TEST-- +basic array_fill_keys test +--INI-- +precision=14 +--FILE-- +<?php + var_dump(array_fill_keys('test', 1)); + var_dump(array_fill_keys(array(), 1)); + var_dump(array_fill_keys(array('foo', 'bar'), NULL)); + var_dump(array_fill_keys(array('5', 'foo', 10, 1.23), 123)); + var_dump(array_fill_keys(array('test', TRUE, 10, 100), '')); +?> +--EXPECTF-- + +Warning: array_fill_keys() expects parameter 1 to be array, string given in %s on line %d +NULL +array(0) { +} +array(2) { + ["foo"]=> + NULL + ["bar"]=> + NULL +} +array(4) { + [5]=> + int(123) + ["foo"]=> + int(123) + [10]=> + int(123) + ["1.23"]=> + int(123) +} +array(4) { + ["test"]=> + string(0) "" + [1]=> + string(0) "" + [10]=> + string(0) "" + [100]=> + string(0) "" +} |