A php library for daily usage

Installs: 10

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/sikaradev-php-utils/helper

v1.3.0 2023-09-10 18:58 UTC

This package is auto-updated.

Last update: 2025-09-25 09:31:22 UTC


README

A php helpers functions for usage in daily dev

filter function

A function to filter a collection of any data type

Usage:

<?php

$filteredItems = Collection::of(['index.php', 'data/country.json'])
->filter((int $k,string $v)=>$v==1)

map function

Convert the data into other type of data

Usage:

<?php
$result = Collection::of(['index.php', 'data/country.json'])
    ->filter(fn(int $k, string $path) => $k == 0)
    ->map(fn(string $v) => strtoupper($v))
    ->get();