Registry / utility / ramsey-array-column

ramsey-array-column

JSON →
library1.1.3phppackagistunverified

Provides functionality for array_column() to projects using PHP earlier than version 5.5.

composer require ramsey/array_column
INSTALL
IMPORT
SIG · RAMSEY-ARRAY-COLUM
R
ramsey-array-column
utilityphpv1.1.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ArrayColumn
use Ramsey\ArrayColumn\ArrayColumn;

Extract a column from a multidimensional array.

use Ramsey\ArrayColumn\ArrayColumn; $records = [ ['id' => 1, 'name' => 'Alice'], ['id' => 2, 'name' => 'Bob'], ]; $names = ArrayColumn::arrayColumn($records, 'name');
Debug
Known issues
gotchaPHP 5.5+ has native array_column() which may conflict if you use both.
fix
Use function_exists('array_column') check before using this polyfill.
affects: >=1.0.0
Upgrade
Version history
1.1.3latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
ramsey-array-column — pip install ramsey-array-column · libregistry