tebru / filter-null
Remove all nulls from an array
v0.1.0
2016-05-23 19:28 UTC
Requires
- php: >= 5.4
Requires (Dev)
- phpunit/phpunit: ^4.0
- satooshi/php-coveralls: ^1.0
This package is auto-updated.
Last update: 2024-11-24 12:03:32 UTC
README
Simple function to remove null values from an array. This is an improvement
over the default functionality of array_filter
as it only removes null
values. Additionally, it works on nested arrays.
Installation
composer require tebru/filter-null
Usage
<?php use Tebru; $array = [1, 2, 3, null, 4]; Tebru\filter_null($array); // [1, 2, 3, 4]