Include constant in string without concatenating

No.

With Strings, there is no way for PHP to tell string data apart from constant identifiers. This goes for any of the string formats in PHP, including heredoc.

constant() is an alternative way to get hold of a constant, but a function call can’t be put into a string without concatenation either.

Manual on constants in PHP

Leave a Comment