Pecl-PHP extension needs to parse the YAML file...

Source: Internet
Author: User
Recently I am writing a PHP extension, which involves a YAML file parsing function... there are currently two solutions: Use a third-party YAML Library (pyyaml. orgwikiLibYAML), the disadvantage is that the third library needs to be installed during the installation of the extension, and this library is not so popular. in... recently I am writing a PHP extension, which involves a YAML file parsing function...

There are currently two solutions:

  1. With a third-party YAML Library (http://pyyaml.org/wiki/LibYAML), the disadvantage is that the third library needs to be installed when installing the extension, and this library is not so popular.
  2. Implement a YAML File Parsing in the extension by yourself. The disadvantage is that it is time consuming...

Please give me an idea ~

Reply content:

Recently I am writing a PHP extension, which involves a YAML file parsing function...

There are currently two solutions:

  1. With a third-party YAML Library (http://pyyaml.org/wiki/LibYAML), the disadvantage is that the third library needs to be installed when installing the extension, and this library is not so popular.
  2. Implement a YAML File Parsing in the extension by yourself. The disadvantage is that it is time consuming...

Please give me an idea ~

Install a third-party library. The syntax of YAML is much more complex than that of JSON, and it is not easy to implement.

It is better to compile PECL if the environment can be modified, or use spyc.

The Symfony2 framework comes with the YAML parsing function, which is componentized and can be used independently.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.