Value

Value checks a value that was received, as from a form or a request.

isBlank

Value::isBlank($value) tells if nothing was received: it is true for null, '' and [], and false for any other value.

use Derafu\Support\Value;

Value::isBlank(null);      // true
Value::isBlank('');        // true
Value::isBlank([]);        // true

Value::isBlank(0);         // false
Value::isBlank('0');       // false
Value::isBlank(false);     // false
Value::isBlank('  ');      // false

It is not the empty() of PHP: 0, '0' and false are values, and a text of spaces has characters.

On this page

Last updated on 19/10/2026 by Anonymous