mcaskill / php-is-var-empty
Determine whether a variable or object is empty.
v1.0.0
2018-09-10 01:30 UTC
Requires
- php: >=5.4.0
This package is not auto-updated.
Last update: 2024-12-12 22:43:20 UTC
README
(PHP 5 >= 5.4)
is_var_empty
— Determine whether a variable or object is empty.
Description
boolean is_var_empty( mixed $var )
Alternative to empty()
which will resolve stringable and arrayable objects.
Parameters
var
— The value to be checked.
Return Values
Returns FALSE
if var exists and has a non-empty value. Otherwise returns TRUE
.
Installation
With Composer
$ composer require mcaskill/php-is-var-empty
Without Composer
Why are you not using composer? Download Function.Is-Var-Empty.php
from the gist and save the file into your project path somewhere.