Skip to content

SiestaCat/php-array-cast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phpfilemanager

Install:

composer require siestacat/php-array-cast

Usage:

use Siestacat\PhpArrayCast\Cast;

Cast::class(range(0,9), \stdClass::class); //Will throw error
Cast::class(array_fill(0, 9, new \stdClass), \stdClass::class); //No error

Cast::type(range(0,9), 'string'); //Will throw error
Cast::class(array_fill(0, 9, 'banana'), 'string'); //No error

Tests:

git clone https://github.com/SiestaCat/php-array-cast.git
cd php-array-cast
composer install
composer run-script test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages