On 17/09/2015 20:51, Rowan Collins wrote:
What would really be handy in a case like this is the ability to
create your own null-like values, guaranteed to be distinct from all
other values:
type hidden extends \php\basetypes\terminal {}
type default extends \php\basetypes\terminal {}
$checklist = hidden;
gettype($checklist); // 'hidden'
$checklist == hidden; // true
$checklist == deafult; // false
isset($checklist); // true
I realised after I wrote it that this particular train of thought has
basically led me to enums.
*drafts new thread about adding enums to PHP*
Regards,
--
Rowan Collins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php