Issue: https://github.com/php/php-src/issues/13081
Author: realjjaveweb
### Description
Hi everyone,
over the years I've encountered many many cases where ?? is just not the solution.
Many PHP core functions return string|false.
Many library world functions return string|false|null and/or some variations with
int/float.
You could argue: "There's elvis! ?:", but that is considered failed for
_**any**_ falsy value (0, "0", null, [], ...) and for that very reason some
project pipeline-like rules don't allow it. (like e.g. phpstan/phpstan-strict-rules)
Would this be something to be even considered?
I guess this may call actually for even a broader approach - a typesafe operator, although I
currently lack better ideas on syntax proposition I believe there could be better, but to get the
idea out:
- fun($var ?string? ''), fun($var ?int? null)
- and similarly $var ?string?= '', $var ?string?= null
Similarly as with ?? and ?: the purpose of this is to create a code sugar
to ease a PHP programmer's day that is already bummed by many rules on daily bases they
can't really bend.