CSV file with SplFileObject

Code
<?php

$content 
= <<<EOF
"name";"age";"drink"
"Paul";"22";"Mate"
"Frank";"40";"Cola"
"Angel";"2";"Juice"
EOF;

$file __DIR__ '/data.csv';

file_put_contents($file$content);

$fobject = new SplFileObject($file);
$fobject->setFlags(SplFileObject::READ_CSV);
$fobject->setCsvControl(';''"');

$data = [];
foreach(
$fobject as $line) {
    
$data[] = $line;
}

echo 
'<pre>' print_r($datatrue) . '</pre>';
Result
Array
(
    [0] => Array
        (
            [0] => name
            [1] => age
            [2] => drink
        )

    [1] => Array
        (
            [0] => Paul
            [1] => 22
            [2] => Mate
        )

    [2] => Array
        (
            [0] => Frank
            [1] => 40
            [2] => Cola
        )

    [3] => Array
        (
            [0] => Angel
            [1] => 2
            [2] => Juice
        )

)
Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8