Is
Detector.
Without specifying the hexColor
method via Is::_()
, checking any input will always return null
.
// This will return `null` because `Is::hexColor()` method does not exist
if (Is::hexColor('#000')) {
echo 'Is a HEX color.';
} else {
echo 'Is not a HEX color.';
}
Result:
Is not a HEX color.