for example -
class wow
{
public $foo = 5;
public function __construct()
{
$sub_class = new sub();
}
}
class sub
{
public function __construct()
{
echo $this->foo;
}
}
$wow = new wow();
Is there a way of doing this?
why the f*** always people minusing my questions? What is your problem? This site is for asking questions, if you have a problem so don't come to this site.