- Output for 5.4.8 - 5.4.45, 5.5.24 - 5.5.29, 5.6.7 - 5.6.13
- Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /in/UfHKm on line 6
Process exited with code 255.
<?php
class foo
{
function do_foo()
{
public $var = 'a default value';
echo "Doing foo.";
echo $this->var;
}
}
$bar = new foo;
$bar -> do_foo();
?>