Hello Guys;

I've being breaking my head for several days already trying to make this work a but it doesn't.

The question is as follow:

I need to create a property within a class, this property should be dynamically created and it have to be use in any other class extending this class, I'm posting the following sample to give you an idea of how it should look and work.

class A
{
public function __construct()
{
$this->config = $this->config();
}

public function config()
{
$config = array(
'name' => 'this name',
'url' => 'http://sample.com'
);
return $config;
}
}
class B extends A
{
public function __construct(){}

public function get_config()
{
return $this->config;
}
}
$B = new B;
echo $B->get_config();

Any help is greatly appreciated!!!

Thanks in advance.