w10schools
Login Register
  • Home
  • Tutorials
    • HTML, CSS
      • HTML, HTML5
      • CSS, CSS3
    • XML
    • JavaScript, AJAX
    • PHP
    • Ruby on Rails
      • Ruby
      • Rails
    • ASP.NET
      • ASP
      • C# .NET
    • Java
      • JSP
    • Databases
      • MySQL
      • MSSQL Server
      • Oracle
    • Web Server
      • Windows
      • Linux
      • Apache
      • IIS
    • Design
      • Dreamweaver
      • Flash
      • Photoshop
      • Fireworks
      • CorelDRAW
      • Illustrator
  • References
    • HTML
      • Bootstrap
    • CSS
      • CSS Selectors
      • Sass
    • JavaScript
    • Mobile Apps
      • Cordova
    • Ruby on Rails
      • Ruby
      • Rails
    • PHP
      • Function
      • Language
      • CodeIgniter
      • Phalcon
      • PHPUnit
      • Symfony
      • Drupal
      • Yii
      • Laravel
    • Perl
      • Perl
    • Python
      • Python
      • Django
      • NumPy
      • Pandas
      • scikit-image
      • scikit-learn
      • Statsmodels
      • Matplotlib
    • Lua
      • Lua
    • C, C++
      • C
      • C++
    • Server
      • Docker
      • Apache HTTP Server
      • Nginx
    • Database
      • PostgreSQL
    • Big Data
      • TensorFlow
    • Game Development
      • Phaser
      • LÖVE
  • Articles
    • News
    • General
      • Website Promotion
      • Online Advertising
      • Make Money Online
    • Editorials
    • Interviews
    • Web Roundups
  • Resources
    • Design
      • Fonts
      • Graphics
      • Vectors
      • Templates
      • UI (User Interface)
      • Brushes
      • Patterns, Backgrounds
      • Textures
    • Web Development
      • HTML, CSS
      • XML
      • JavaScript, AJAX
      • Ruby on Rails
      • PHP
      • Java
      • .NET
      • Python
      • Perl
      • Flash
    • Mobile Application Development
      • Mobile Development Tools
      • Swift
    • Online Services
      • Online Storage
      • Web Hosting
  • Tools
    • Generators
Edit
In Place Editing Advanced Editing
  • References
  • PHP
  • Symfony
  • Component
  • Yaml

Yaml::parse()

static mixed parse(string $input, int $flags)

Parses YAML into a PHP value.

Usage: $array = Yaml::parse(filegetcontents('config.yml')); print_r($array);

Parameters

string $input A string containing YAML
int $flags A bit field of PARSE_* constants to customize the YAML parser behavior

Return Value

mixed The YAML converted to a PHP value

Exceptions

ParseException If the YAML is not valid
Links:
  • http://api.symfony.com/master/Symfony/Component/Yaml/Yaml.html#method_parse
doc_Symfony
doc_Symfony
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.

Popular Articles
yaml_parse (PECL yaml >= 0.4.0) Parse a YAML stream mixed yaml_parse ( string $input [, int $pos = 0 [, i
yaml_parse_file (PECL yaml >= 0.4.0) Parse a YAML stream from a file mixed yaml_parse_file ( string $filename [
yaml_parse_url (PECL yaml >= 0.4.0) Parse a Yaml stream from a URL mixed yaml_parse_url ( string $url [, int $
Yaml class Yaml Yaml offers convenience methods to load and dump YAML. Constants DUMP_OBJECT PARSE_EXCEPTION_ON_INVALID_TYPE PARSE_OBJECT
yaml yaml(io = nil, options = {}) Instance Public methods Convert this node to YAML. See also Psych::Visitors::Emitter to_yaml


Return to View
  • Facebook
  • Tweet
  • Digg it
  • Stumbleupon
  • Delicious
  • Plus Share

Designed by : w10schools

service@w10schools.com

Our Partners: aeeble – Providing content publishing and search solutions