C
C
cybernoob2018-01-31 13:52:44
PHP
cybernoob, 2018-01-31 13:52:44

What is the error in the script?

All OK:

$a = 'вывод';
eval("echo \"$a\";");

So
$a = 'вывод';
eval("echo $a;");

Notice: Use of undefined constant output - assumed 'output' in ...test.php(5) : eval()'d code on line 1
output
Where does he see the constant? Ok, let's do:
$a = '\'вывод\'';
eval("echo \"$a\";");

On screen 'output' (together with quotes).
So in PHP it should turn into like and then the word without quotes should be shown on the screen? echo 'вывод';

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question