- Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7
- Parse error: syntax error, unexpected ';', expecting '(' in /in/N6mRK on line 12
Process exited with code 255.
<?php
class Foo
{
const WEB_NAME = 'web name';
public function vai()
{
$templateName = 'web';
$templateName = strtoupper($templateName) . '_NAME';
$templateName = self::{$templateName};
return $templateName;
}
}
$a = new Foo;
echo $a->vai();