I am using Composer to autoload my custom classes in a project. Can anyone tell me why the code below does not work, instead it gives Fatal error: Class 'Person' not found?
$sql = "select * from person"; $persons = $dbh->query($sql)->fetchAll(PDO::FETCH_CLASS, 'Person');
And this on the otherhand works and does not give that error:
$p = new Person(); var_dump($p);