DEV Community

Discussion on: I Want Scalar Objects in PHP

 
dallgoot profile image
dallgoot

and for another suggestion since i found a way to declared constant dynamically:
a way to get constants declared in a specific namespace.
something like:

// returns an array with name => value (as get_defined_constants does)
get_namespace_constants(__NAMESPACE__);
Thread Thread
 
paulthebaud profile image
Paul Thébaud

Agree with you on those points. An update can be done on this features.
And of course, it would make sense as you say, because of Closure as a type and __invoke method :)
+1 !