Skip to content

Instantly share code, notes, and snippets.

@shoorick
Last active November 29, 2018 05:46
Show Gist options
  • Save shoorick/4b84d4a8d8404ede668225de68fb96ba to your computer and use it in GitHub Desktop.
Save shoorick/4b84d4a8d8404ede668225de68fb96ba to your computer and use it in GitHub Desktop.
Reserialize PHP-serialized data to YAML
#!/usr/bin/perl -0777 -n
=head1 NAME
p2yaml.pl - PHP to YAML reserializer.
=head1 DESCRIPTION
Reserialize PHP-serialized data to YAML
=head1 USAGE
./p2yaml.pl input.txt
=head1 AUTHOR
Alexander Sapozhnikov L<shoorick@cpan.org>
=cut
use strict;
use PHP::Serialization qw( unserialize );
use YAML;
print Dump unserialize($_);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment