diff options
author | Marcus Boerger <helly@php.net> | 2006-07-15 10:21:10 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2006-07-15 10:21:10 +0000 |
commit | 87c64280b0b6a03e61dae5a62ece5169f706938d (patch) | |
tree | e6b5638d5d8db295930d95afc1f5982e1e236342 /ext/standard/tests/array/array_fill_keys.phpt | |
parent | 54dba635a31790f9b7802c258a5b85b680348a08 (diff) | |
download | php-git-87c64280b0b6a03e61dae5a62ece5169f706938d.tar.gz |
- MFH Added array_fill_keys(). (Marcus, Mathew W)
Diffstat (limited to 'ext/standard/tests/array/array_fill_keys.phpt')
-rwxr-xr-x | ext/standard/tests/array/array_fill_keys.phpt | 42 |
1 files changed, 42 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 100755 index 0000000000..7a9938746c --- /dev/null +++ b/ext/standard/tests/array/array_fill_keys.phpt @@ -0,0 +1,42 @@ +--TEST-- +basic array_fill_keys test +--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(): First parameter must be an array in %s on line %d +bool(false) +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) "" +} |