mcaskill/php-is-var-empty

Determine whether a variable or object is empty.

Installs: 10

Dependents: 0

Suggesters: 0

Security: 0

pkg:composer/mcaskill/php-is-var-empty

v1.0.0 2018-09-10 01:30 UTC

This package is not auto-updated.

Last update: 2025-10-17 02:37:49 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.