summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/array_column_basic.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/tests/array/array_column_basic.phpt')
-rw-r--r--ext/standard/tests/array/array_column_basic.phpt11
1 files changed, 10 insertions, 1 deletions
diff --git a/ext/standard/tests/array/array_column_basic.phpt b/ext/standard/tests/array/array_column_basic.phpt
index eb267dad73..7c30cdfd10 100644
--- a/ext/standard/tests/array/array_column_basic.phpt
+++ b/ext/standard/tests/array/array_column_basic.phpt
@@ -84,11 +84,12 @@ echo "\n*** Testing numeric column keys ***\n";
$numericCols = array(
array('aaa', '111'),
array('bbb', '222'),
- array('ccc', '333')
+ array('ccc', '333', -1 => 'ddd')
);
var_dump(array_column($numericCols, 1));
var_dump(array_column($numericCols, 1, 0));
var_dump(array_column($numericCols, 1, 0.123));
+var_dump(array_column($numericCols, 1, -1));
echo "\n*** Testing failure to find specified column ***\n";
var_dump(array_column($numericCols, 2));
@@ -239,6 +240,14 @@ array(3) {
["ccc"]=>
string(3) "333"
}
+array(3) {
+ [0]=>
+ string(3) "111"
+ [1]=>
+ string(3) "222"
+ ["ddd"]=>
+ string(3) "333"
+}
*** Testing failure to find specified column ***
array(0) {