I have these 2 classes in 2 different files
class Foo {
public $type = int;
function __construct($out = 1) {
$this->type=$out;
}
public function get() {
return $this->type;
}
}
AND
class bar {
function __construct {
echo $foo->get();
}
}
maybe a dumb question but how come this is not working? In the above index.php file I have
$vFoo = new Foo(15);
$vBar = new Bar();
I though that Bar will echo Foo's type..