If you want to use YAML in PHP, you need to install the extension with PECL:
pecl install yaml
If it fails with a
libtool version mismatch error, you will need to download it first, compile and install it yourself, and enable it in the php.ini file.
Once that's done, you can easily parse your file by getting its content and running the parse function, like so:
$vars = yaml_parse( file_get_contents( './vars.yml' ) );