Firstly, when you put a variable inside single quotes, it's no longer a variable, i.e. it will be parsed as a literal string. So
$result = $permissions->is_registered('$username','$password');
should be
$result = $permissions->is_registered($username',$password);
For you problem: Here's a simplified reconstruction of your described code that works like I think you're trying to do:
class Validation
{
var $notices;
function Validation()
{
$this->notices = 'false';
}
function add_notices($var)
{
if ($var) {
$this->notices = 'true';
}
}
function get_notices()
{
return $this->notices;
}
}
class Permissions
{
var $val_obj;
function Permissions($obj)
{
$this->val_obj = $obj;
}
function is_registered($uname, $pword)
{
$this->val_obj->add_notices(true);
}
}
$validate = new Validation();
$permissions = new Permissions($validate);
$username = 'username';
$password = 'password';
$result = $permissions->is_registered($username,$password);
$notices = $validate->get_notices();
echo $notices;
// Echos "true"