Page MenuHomePhorge
Diviner Arcanist Tech Docs phutil_nonempty_scalar

function phutil_nonempty_scalar($value)
Arcanist Technical Documentation ()

Test if a value is a nonempty, scalar value.

The value "null", the empty string, and objects which have a "__toString()" method which returns the empty string are empty.

Other strings, objects with a "__toString()" method which returns a string other than the empty string, integers, and floats are considered scalar.

This method raises an exception if passed any other value.

Parameters
Value$valueto test.
Return
boolTrue if the parameter is a nonempty, scalar value.