YAML is light on the ground in PHP. Outside the Spyc library which is bundled with Symfony and used for it's own input filtering configuration, I can't think of another native parser. Syck is pretty much standard in Ruby (as Gavin noted), and has bindings for Perl, Python, PHP, etc. Until a standard core extension for YAML appears, a PHP parser is the only reliable means of adding YAML processing to a PHP application without recompiling PHP with Syck.
If nothing pops up from Bruce (who suggested a YAML parser for the ZF per Gavin's email last Summer) in the next few days I'll take a look at what a parser would require. The YAML spec isn't completely off the wall complicated esp. since hierarchy is dictated by simple indentation and the rest should be a simple variable/array type mapping between YAML and PHP based on the YAML syntax characters. The only complicated bit would be managing parenting properly since the format would be processed top to bottom. I'll see if I have some free time later in the week to look at it in more detail. If I do I'll submit a proposal so there's something to read once the 1.0 release is made and if it's feasible I'll commit some personal time to developing it. I guess if I want it I might as well add it :). Paddy Pádraic Brady http://blog.astrumfutura.com http://www.patternsforphp.com ----- Original Message ---- From: Matthew Weier O'Phinney <[EMAIL PROTECTED]> To: [email protected] Sent: Tuesday, March 20, 2007 5:48:40 PM Subject: Re: [fw-general] Where's the YAML parser? I'd love to see a YAML parser in ZF -- though some might see it as a further rails-ification of ZF, YAML has many benefits over other config file formats (such as the readability you note, as well as deeper nesting than INI, etc.). I've seen recently that somebody is creating a YAML PHP extension, but I haven't heard of any written *in* PHP. Anybody want to submit a proposal? (I'd submit one, but my hands are kind of tied with the other framework components I lead... ;-) ) -- Matthew Weier O'Phinney PHP Developer | [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/ ____________________________________________________________________________________ Don't get soaked. Take a quick peek at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather
