https://www.php.net/manual/fr/function.array-key-last.php#123950
did return the first key of my array only:
"array_keys($array)[count($array) - 1] ?? null" works
I hope the example is fine for everyone else.
My array is:
[
new NameExpression('d', 0),
new NameExpression('f', 0),
new NameExpression('g', 0),
]