The following code snip is giving me an error in PHP5:
<?php
class myClass
{
public $myVar= $self->myFunction(); //Error here
function myFunction()
{
return 'Hello World';
}
}
$data = new myClass;
echo $data->myVar;
?>
The error is "Unexpected T_VARIABLE".
What am I doing wrong, and is there anything else I should be aware of?