mcaskill/php-is-var-empty

Determine whether a variable or object is empty.

Maintainers

Package info

gist.github.com/mcaskill/89a69e4ef71bcc5090fe8274248d6079

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

Statistics

Installs: 10

Dependents: 0

Suggesters: 0

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

This package is not auto-updated.

Last update: 2026-03-06 04:30:47 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.