@kboyd Ignore the eval() part of that, btw. It's just an artifact of trying to do it all in one file.
@pollita Hmm. I guess that's about the same as what I saw (using a temp variable to store the constant's value). Was mostly hoping there was a convenient way to avoid the temp variable.
@pollita Sorry, I didn't provide full context (since it was just some code I was glancing at). I wanted to replace a temporary variable inside a method that was storing a deeply-namespaced class constant's value, with a use statement & alias. The temporary variable only exists because it's more readable than the full reference to the class constant.
Open source. Open community. We are dedicated to building and enriching the PHP community.