<?php
use Alura\Pdo\Domain\Model\Student;
require_once 'vendor/autoload.php';
$dbDirectory = DIR . '/banco.sqlite'; $pdo = new PDO('sqlite:' . $dbDirectory);
$student = new Student(null, 'Luciano Gouveia', new \DateTimeImmutable('1989-07-13'));
$sqlInsert = "INSERT INTO studantes (name, birth_date) VALUES ('{$student->name()}', '{$student->birthDate()->format('Y-m-d')}');";
var_dump($pdo->exec($sqlInsert));
----- retorno no console -------
C:\php-7.4.3-Win32-vc15-x64\php.exe D:\Estudo\pdo-alura\inserir-aluno.php bool(false) SELECT * FROM studantes Process finished with exit code 0