This code gives the warning of the title. Simplest solution would be to add the single quotes to "not_a_constant". This however break the "eval" I have tried concatenation of strings, etc.
The eval SHOULD NOT BE removed. No auxiliary variables should be used.
eval('$some_defined_var[not_a_constant] .= "' . some_function('some_string') . '";')
Please try this code defining some dumb vars and functions with php 7.2 to check the warning and possible solutions.
Edit 1)Code standards forbids to use doble quotes for string.s 2)We are trying to avoid scaping the single quotes inside the indexing in the "not_a_constant". This means, what I'm trying to achieve is this:
$some_defined_var['not_a_constant']