PHPackages                             3rd-party/yaml - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. 3rd-party/yaml

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

3rd-party/yaml
==============

PHP Yaml Parser

v1.0(13y ago)114037MITPHPPHP &gt;=5.0

Since Jun 30Pushed 5y ago2 watchersCompare

[ Source](https://github.com/eriknyk/Yaml)[ Packagist](https://packagist.org/packages/3rd-party/yaml)[ Docs](https://github.com/eriknyk/Yaml)[ RSS](/packages/3rd-party-yaml/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

README
======

[](#readme)

[![Build Status](https://camo.githubusercontent.com/9f0e075d5459699bb41bab13451f162935c3e0d9d8acdff3be37b170cef39654/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6572696b6e796b2f59616d6c2e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/eriknyk/Yaml)

PHP Yaml
--------

[](#php-yaml)

```
#
#   Yaml loader library for PHP
#
--- %YAML:1.1
title: Simple & Lightweight PHP YAML Class
version: 1.0
authors: [chris wanstrath (chris@ozmm.org), vlad andersen (vlad.andersen@gmail.com), erik amaru ortiz (aortiz.erik@gmail.com)]
links: [http://www.yaml.org, https://github.com/eriknyk/Yaml]
license: [MIT License, http://www.opensource.org/licenses/mit-license.php]
copyright: "(c) 2005-2006 Chris Wanstrath, 2006-2011 Vlad Andersen, 2012 Erik Amaru Ortiz"
tested on: [php 5.2.x, php 5.3.10]

installation: >
  Just copy and include Yaml.php to work directory and use it!

about: >
  From www.yaml.org:

  "YAML(tm) (rhymes with 'camel') is a human-friendly, cross language,
  Unicode based data serialization language designed around the common
  native data structures of agile programming languages. It is broadly
  useful for programming needs ranging from configuration files to
  Internet messaging to object persistence to data auditing. Together
  with the Unicode standard for characters, the YAML specification provides
  all the information necessary to understand YAML Version 1.1 and to
  creating programs that process YAML information.

  YAML(tm) is a balance of the following design goals:
    - YAML documents are very readable by humans.
    - YAML interacts well with scripting languages.
    - YAML uses host languages' native data structures.
    - YAML has a consistent information model.
    - YAML enables stream-based processing.
    - YAML is expressive and extensible.
    - YAML is easy to implement."

  YAML makes a lot of sense.  It's easy to use, easy to learn, and cool.
  As the lucky stiff named why once said, "YAML is a beacon of light."

  If you're new to YAML, may we suggest YAML In Five Minutes:
    - http://yaml.kwiki.org/?YamlInFiveMinutes

  If you don't have five minutes, realize that this README is a completely
  valid YAML document.  Dig in, load this or any YAML file into an array
  with Spyc and see how easy it is to translate friendly text into usable
  data.

  The purpose of Spyc is to provide a pure PHP alternative to Syck, a
  simple API for loading and dumping YAML documents, a YAML loader which
  understands a usable subset of the YAML spec, and to further spread
  the glory of YAML to the PHP masses.

  If you're at all hesitant ("usable subset of YAML?!"), navigate
  http://yaml.org/start.html.  Spyc completely understands the YAML
  document shown there, a document which has features way beyond the
  scope of what normal config files might require.  Try it for yourself,
  and then start enjoying the peace of mind YAML brings to your life.

meat and a few potatoes:
  - concept: Loading a YAML document into PHP
    brief: >
      $yaml will become an array of all the data in wicked.yaml
    code: |

      include('spyc.php');

      $yaml = Spyc::YAMLLoad('wicked.yaml');

  - concept: Loading a YAML string into PHP
    brief: >
      $array will look like this:
        array('A YAML','document in a','string')
    code: |

      include('spyc.php');

      $yaml  = '- A YAML\n- document in a\n- string.';
      $array = Spyc::YAMLLoad($yaml);

  - concept: Dumping a PHP array to YAML
    brief: >
      $yaml will become a string of a YAML document created from
      $array.
    code: |

      include('spyc.php');

      $array['name']  = 'chris';
      $array['sport'] = 'curbing';

      $yaml = Spyc::YAMLDump($array);

prior art:
  - who: [Brian Ingerson, Clark Evans, Oren Ben-Kiki]
    why?: >
      The YAML spec is really a piece of work, and these guys
      did a great job on it.  A simple and elegant language like
      YAML was a long time coming and it's refreshing to know
      such able minded individuals took the task to heart and
      executed it with cunning and strength.  In addition to
      their various noteworthy contributions to YAML parsers
      and related projects, YAML.pm's README is a treasure trove
      of information for knowledge seekers.  Thanks, guys.

  - who: why the lucky stiff
    why?: >
      As the author of Syck, the code used in Ruby for the language's
      YAML class and methods, why is indirectly (directly?) responsible
      for my first exposure to YAML (as a config file in a Ruby web-app)
      and the countless hours I spent playing with this sheik new data
      format afterwards.  Syck's README is a YAML file and thus the
      inspiration for this file and, even, this very piece of software.

  - who: Steve Howell
    why?: >
      Python's YAML implementation.  PyYAML's README file is also YAML,
      so it too inspired the YAML format of this README file.

  - who: [Rasmus Lerdorf, Zeev Suraski, Andi Gutmans, et al]
    why?: >
      PHP is great at what it does best.  It's also paid a lot of my bills.
      Thanks.

bugs:
  report: >
    Please see Spyc's Sourceforge project page for information on reporting bugs.
  speed: >
    This implementation was not designed for speed.  Rather, it
    was designed for those who need a pure PHP implementation of
    a YAML parser and who are not overly concerned with performance.
    If you want speed, check out Syck.
  depth: >
    This parser is by no means a comprehensive YAML parser.  For supported
    features and future plans, check the website.
  unicode: >
    YAML is supposed to be unicode, but for now we're just using ASCII.
    PHP has crappy unicode support but who knows what the future holds.

resources:
  - http://www.yaml.org
  - http://www.yaml.org/spec/
  - http://yaml.kwiki.org/?YamlInFiveMinutes
  - http://www.whytheluckystiff.net/syck/
  - http://yaml4r.sourceforge.net/cookbook/

thanks:
  - Adam Wood
  - Daniel Ferreira
  - Aaron Jensen
  - Mike Thornton
  - Fabien Potencier
  - Mustafa Kumas
```

###  Health Score

31

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

5012d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f3bf4f3c386f72872d6f6515fbebf27201279ede3d58f81203a9b983e260d0b?d=identicon)[3rd-party](/maintainers/3rd-party)

![](https://www.gravatar.com/avatar/aef3562a1415869dcf8ad9a5d6e11d88a14158f401f285a6b87c109e5f96db2e?d=identicon)[eriknyk](/maintainers/eriknyk)

---

Top Contributors

[![eriknyk](https://avatars.githubusercontent.com/u/205721?v=4)](https://github.com/eriknyk "eriknyk (13 commits)")[![mzaini30](https://avatars.githubusercontent.com/u/7939342?v=4)](https://github.com/mzaini30 "mzaini30 (1 commits)")

---

Tags

phpparseryaml

### Embed Badge

![Health badge](/badges/3rd-party-yaml/health.svg)

```
[![Health](https://phpackages.com/badges/3rd-party-yaml/health.svg)](https://phpackages.com/packages/3rd-party-yaml)
```

###  Alternatives

[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k896.2M97](/packages/doctrine-lexer)[simplehtmldom/simplehtmldom

A fast, simple and reliable HTML document parser for PHP.

1881.2M13](/packages/simplehtmldom-simplehtmldom)[corveda/php-sandbox

A PHP library that can be used to run PHP code in a sandboxed environment

23680.6k2](/packages/corveda-php-sandbox)[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

589.9k](/packages/sbsaga-toon)[leonelquinteros/php-toml

PHP parser for TOML language ( https://github.com/toml-lang/toml )

266.6k](/packages/leonelquinteros-php-toml)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
