Replies: 2 comments 5 replies
-
Hmm, can you provide me with a use case that is commonly viable? The current implementation is to serve all the internal needs (before you ask: the $var = 'h';
$eccLevel = constant(EccLevel::class.'::'.strtoupper($var)); |
Beta Was this translation helpful? Give feedback.
5 replies
-
Just adding the note here that as of PHP 8.3, class constants can be called from a variable: $eccLevel = EccLevel::{$var}; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For
\chillerlan\QRCode\Common\EccLevel
a static function likefromString()
would be nice. I. e.,EccLevel::fromString('H')
should returnEccLevel::H
and so on. Lower case and upper case letter should be possible.Beta Was this translation helpful? Give feedback.
All reactions