From manual page: https://php.net/function.yaml-parse-file
The manual clains:
"Returns the value encoded in input in appropriate PHP type or false on failure. If pos is -1 an array will be returned with one entry for each document found in the stream."
When installed using apt install php-yaml, the versions 8.2 and 8.3 return either an array with the parsed data or a string with an error message. It never returns false.