Why do i get an unexpected function error in this code?
PHP Code:
<?php
class function {
function test() { $var = "test"; echo $var; }
}
$test = new function();
echo $test->test(); ?>
Comment