Home
last modified time | relevance | path

Searched refs:array_column (Results 1 – 18 of 18) sorted by relevance

/php-src/ext/standard/tests/array/
H A Darray_column_scalar_index_strict_types.phpt2 Test array_column(): Index argument with various types in strict type mode
9 var_dump(array_column([['php7', 'foo'], ['php8', 'bar']], false));
14 var_dump(array_column([['php7', 'foo'], ['php8', 'bar']], true));
21 var_dump(array_column([['php7', 'foo'], ['php8', 'bar']], array()));
28 var_dump(array_column([['php' => 7, 'foo'], ['php' => 8, 'bar']], 'php', false));
33 var_dump(array_column([['php' => 7, 'foo'], ['php' => 8, 'bar']], 'php', true));
50 array_column(): Argument #2 ($column_key) must be of type string|int|null, false given
51 array_column(): Argument #2 ($column_key) must be of type string|int|null, true given
57 array_column(): Argument #3 ($index_key) must be of type string|int|null, false given
58 array_column(): Argument #3 ($index_key) must be of type string|int|null, true given
[all …]
H A Darray_column_scalar_index_weak_types.phpt2 Test array_column(): Index argument with various types in weak type mode
7 var_dump(array_column([['php7', 'foo'], ['php8', 'bar']], false));
12 var_dump(array_column([['php7', 'foo'], ['php8', 'bar']], true));
19 var_dump(array_column([['php7', 'foo'], ['php8', 'bar']], array()));
26 var_dump(array_column([['php' => 7, 'foo'], ['php' => 8, 'bar']], 'php', false));
31 var_dump(array_column([['php' => 7, 'foo'], ['php' => 8, 'bar']], 'php', true));
38 var_dump(array_column([['php' => 7, 'foo'], ['php' => 8, 'bar']], 'php', array()));
61 -- Testing array_column() column key parameter should be a string or integer (testing array) --
62 array_column(): Argument #2 ($column_key) must be of type string|int|null, array given
78 -- Testing array_column() index key parameter should be a string or integer (testing array) --
[all …]
H A Darray_column_basic.phpt2 Test array_column() function: basic functionality
27 var_dump(array_column($records, 'first_name'));
30 var_dump(array_column($records, 'id'));
74 var_dump(array_column($values, 'value'));
83 var_dump(array_column($numericCols, 1));
84 var_dump(array_column($numericCols, 1, 0));
86 var_dump(array_column($numericCols, 1, -1));
89 var_dump(array_column($numericCols, 2));
92 var_dump(array_column($numericCols, 3.14));
128 var_dump(array_column($records, $f));
[all …]
H A Darray_column_variant_objects.phpt2 Test array_column() function: testing with objects
54 var_dump(array_column($records, 1));
57 var_dump(array_column($records, 0));
60 var_dump(array_column($records, 2, 0));
63 var_dump(array_column($records, 2, 1));
68 var_dump(array_column($records, 'first_name'));
71 var_dump(array_column($records, 'id'));
74 var_dump(array_column($records, 'last_name', 'id'));
77 var_dump(array_column($records, 'last_name', 'first_name'));
82 *** Testing array_column() : object property fetching (numeric property names) ***
[all …]
H A Darray_column_numeric_string_key.phpt2 array_column() treats numeric string keys as usual
7 var_dump(array_column($array, 42));
8 var_dump(array_column($array, "42"));
H A Dbug69723.phpt2 Bug #69723 (Passing parameters by reference and array_column)
24 var_dump(array_column($array, 'superhero'));
26 var_dump(array_column($array, 'superhero'));
H A Dbug68553.phpt2 Bug #68553 (array_column: null values in $index_key become incrementing keys in result)
23 var_dump(array_column($a, null, 'a'));
26 var_dump(array_column([['a' => new stdClass]], null, 'a'));
31 var_dump(array_column([['a' => []]], null, 'a'));
H A Dbug71660.phpt2 Bug #71660 (array_column behaves incorrectly after foreach by reference)
12 var_dump(array_column($arr, 'name', 'id'));
H A Darray_column_property_visibility.phpt2 array_column() respects property visibility
20 var_dump(array_column($arr, "prop"));
H A Darray_column_variant.phpt2 Test array_column() function: variant functionality
12 var_dump(array_column($rows, null, 'id'));
15 var_dump(array_column($rows, null, 'foo'));
18 var_dump(array_column($rows, null));
H A Dbug72031.phpt2 Bug #72031: array_column() against an array of objects discards all values matching null
25 var_dump(array_column($objects, 'prop'));
H A Darray_column_object_cast.phpt2 Test array_column() function: basic functionality
31 $firstNames = array_column($records, $column_key, $index_key);
H A Dbug76713.phpt7 return array_column(array($obj), "prop");
/php-src/ext/standard/tests/array/sort/
H A Dbug77395.phpt15 array_multisort(array_column($data, 'bb'),SORT_DESC, $data); // PHP Warning error
/php-src/ext/spl/tests/
H A Dgh10519.phpt24 return array_column($this->getArrayCopy(), $colname);
/php-src/ext/standard/
H A Dbasic_functions.stub.php1732 function array_column(array $array, int|string|null $column_key, int|string|null $index_key = null)… function
H A Dbasic_functions_arginfo.h2355 ZEND_FUNCTION(array_column);
H A Darray.c4629 PHP_FUNCTION(array_column) argument

Completed in 42 milliseconds