What is wrong with this code:
<?php eval(" $start = microtime(true)*1000; echo 'hello'; $end=microtime(true)*1000; $time = $end-$start; $time = round($time,4); echo '<br />Time taken: '.$time.'ms<br />'; "); ?>
It's exactly one line code(dont ask why) but for readablility I repeat
<?php
eval(" $start = microtime(true)*1000;
echo 'hello';
$end=microtime(true)*1000;
$time = $end-$start;
$time = round($time,4);
echo '<br />Time taken: '.$time.'ms<br />';
");
?>
I get this error:
Parse error: syntax error, unexpected '=' in ...\test2.php(1) : eval()'d code on line 1
eval()statement?$startwhich PHP is interpolating in double quotes to a scalar, to which you cannot assign via=.