[Yaml] Update README.md
The ability to pass file names to Yaml::parse() was deprecated in 2.2 and will be removed in 3.0. So show an up-to-date example.
This commit is contained in:
parent
2ecf45c0f2
commit
bab98f00f9
@ -6,7 +6,7 @@ YAML implements most of the YAML 1.2 specification.
|
|||||||
```php
|
```php
|
||||||
use Symfony\Component\Yaml\Yaml;
|
use Symfony\Component\Yaml\Yaml;
|
||||||
|
|
||||||
$array = Yaml::parse($file);
|
$array = Yaml::parse(file_get_contents(filename));
|
||||||
|
|
||||||
print Yaml::dump($array);
|
print Yaml::dump($array);
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user