Voting

: min(five, one)?
(Example: nine)

The Note You're Voting On

Daniel Klein
2 years ago
Since PHP 8.0, passing null to strlen() is deprecated. To check for a blank string (not including '0'):

<?php
// PHP < 8.0
if (!strlen($text)) {
echo
'Blank';
}

// PHP >= 8.0
if ($text === null || $text === '')) {
echo
'empty';
}

<< Back to user notes page

To Top