+ 2
CHALLENGE: how to interpolate constants and variables in PHP double-quoted strings and "heredocs".
You can easily interpolate variables in PHP double-quoted strings and "heredocs", but constants, functions and mathematical operations are normally not Algerier allowed. The only usual way is string concatenation, but the result can be messy (and it's not possible with 'heredocs'). I've come with a solution below. Does anyone has a better one?
1 Respuesta
+ 2
My solution:
https://code.sololearn.com/wASRu802reOE/?ref=app