Page MenuHomePhorge
Diviner libphutil Tech Docs phutil_nonempty_string

function phutil_nonempty_string($value)
libphutil Technical Documentation (Core Utilities)

Test if a value is a nonempty string.

The value "null" and the empty string are considered empty; all other strings are considered nonempty.

This method raises an exception if passed a value which is neither null nor a string.

Parameters
Value$valueto test.
Return
boolTrue if the parameter is a nonempty string.