<?php

class A {
    protected $token = 'tttttttt';
    function aa() {
        $res = $this->token;
        return $res;
    }
}
 
class B extends A
{
    public function __get($name) {
    	switch($name) {
    		case 'token': return $this->getToken();
    	}

    	return null;
    }
    
	function aa() {
        return $this->getToken();
    }
    
    private function getToken() {
    	return '666666666';
    }
}

$b = new B();
$bb = $b->aa();
echo "$bb\n";
echo "$b->token\n";