I didn't dependency injection. I read same questions but i can't.
index.php:
<?php
namespace Test;
use \Test\File\FileControl;
require "b.php";
$s = new FileControl;
$s->taner($re);
b.php
<?php
namespace Test\File;
require "c.php";
class FileControl {
public function taner(re $re) {
$re->taner();
}
}
c.php
namespace Test\File;
class re {
public function taner() {
echo 'hellow!';
}
}
print: Catchable fatal error: Argument 1 passed to Test\File\FileControl::taner() must be an instance of Test\Filee, null given, called in /index.php on line 9 and defined in /b.php on line 8
what's the wrong, please help