Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6698475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:34:56+00:00 2026-05-26T06:34:56+00:00

I’m currently writing my own PHP Framework (for kicks, not for mission critical stuff)

  • 0

I’m currently writing my own PHP Framework (for kicks, not for mission critical stuff) and I’m trying to add in functionality where the user can set up what databases the framework should use (a primary db and then maybe one or two fallbacks – like sqlite), where certain files are located, etc. Should I use YAML for this? Is there a better approach or a standard practice?

My Thoughts

  1. YAML is user (non-technical) friendly in terms of readability
  2. In order to keep my Framework from requiring non-standard PHP libraries, I’d have to use something like Symfony YAML in order to parse the file.
  3. Isn’t Symfony moving away from YAML?
  4. I could use a PHP file full of variables but that would make setup of the framework less transparent to the user.

Update

I’m cleaning this question up to make it more constructive and to incorporate some of the answers I’ve gotten.

Overall Questions I Have

  1. What are the advantages of YAML over other approaches like XML or even an INI file setup?
  2. What is a good rule of thumb regarding when to use YAML over those other approaches or vice versa?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:34:58+00:00Added an answer on May 26, 2026 at 6:34 am

    NO

    Personal experience. YAML seems a wonderful idea and I loved it and its simplicity. Then I started investing time on it: the very same concept of being able to read it in a language and write in another was very enticing, but… cutting it short, it turned up to be a mere illusion, unsubstantiated by facts.

    Every implementation of YAML differs too much from the other ones.

    • Arrays, automatically serialized by one, cannot sometimes be read by another.

    • Cross references are supported, but their implementation is really sketchy.

      References are powerful, but:

      • They are quite limited for some hardcore application.
      • They represent an overkill to most low-end YAML-based projects.

      So, frequently, they are ignored, and errored upon, by most parsers.

    Summing it up, the standard isn’t well set.

    There are core concepts that are nice and simple, but the actual standard document is full of details about features that most people don’t want to use and are difficult and expensive to implement.

    There isn’t a distinction of levels of compatibility, like there is in DOM (DOM level 1, DOM level 2, etc) so every parser implementor implements what they feel like to, to the extent they can bear, then they drop it and it’s hard to discern what works and what doesn’t.

    Use Alternatives

    • JSON if you value the cross language data exchange language and little redundancy aspects as the top priority

    • INI if you value performance and backward compatibility (on PHP, as parse_ini_file() is fast, and there since… always) and readability/editability by humans, instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm trying to create an if statement in PHP that prevents a single post
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I am currently running into a problem where an element is coming back from
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.