One more good news for you, YAML-users. ![]()
I’ve implemented emitter functionality in php-binding of syck library. It is quite straight-forward, no fancy stuff for now, but it should work
Supported datatypes:
- associative arrays
- indexed arrays
- strings
- integers
- floats
- booleans
- null
Objects are simply ignored now, though I am planning to add support for them later. See TODO for details.
Example, to give you idea:
$data = array(
'items' => array(
'item 1',
'item 2'
),
'count' => 2
);
echo syck_dump($data);
take a look at my previous yaml-post for installation instructions.
Let me know how this works for you
p.s. should I change the name of that function? :-/

Great! I read this post and it made me a little happier.
But what about syck as a library? Is it possible?
I’m asking because I think my shared hosting provider won’t be very happy to rebuild php which is used untouched for some month and is perfectly working.
well, if your hosting doesn’t block dl() function, you can dynamically load it by yourself
see this for details:
http://www.php.net/manual/en/function.dl.php#59424
thnx
> p.s. should I change the name of that function? :-/
the name sounds pretty well
Rubs hands with glee
.
Having emitter functionality will be great!
Alexey Zakhlestin’s Blog: YAML: Syck for PHP is not read-only anymore…
…
[...] Alexey Zakhlestin mentions some new YAML functionality he’s worked up – emitter functionality: One more good news for you, YAML-users. I’ve implemented emitter functionality in php-binding of syck library. It is quite straight-forward, no fancy stuff for now, but it should work. [...]
[...] Det går nu också att skriva YAML i PHP, vilket känns väldigt bra. [...]
It’s look funny
Insightful read. I have stumbled and twittered this for my friends. Others no doubt will like it like I did.