Can anyone help me with getting eval() to work in php7
$A = 1;
$B = 2;
$C = '';
eval($A + $B);
gives
Parse error : syntax error, unexpected end of file in C:\xampp\htdocs… : eval()'d code on line 1
I have tired
eval($C = $A + $B);
eval("$C = $A + $B");
and added various semicolons. It was working on PHP5 but now on PHP 7 I cant get it to work.
BTW, please do not give me a lecture about the dangers of eval(). thans in advance.