Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 966 Bytes

README.md

File metadata and controls

33 lines (21 loc) · 966 Bytes

serialized-php-parser Build Status

Simple MIT licensed Java library to access data serialized by PHP.

Usage

serialized-php-parser is published in the central Maven repository and can be included using the following dependency information:

<dependency>
	<groupId>com.github.ooxi</groupId>
	<artifactId>serialized-php-parser</artifactId>
	<version>0.5.0</version>
</dependency>

Deserializing data is as simple as

String data = "O:8:\"TypeName\":1:{s:3:\"foo\";s:3:\"bar\";}";
SerializedPhpParser phparser = new SerializedPhpParser(data);
PhpObject result = (PhpObject)phparser.parse();

System.out.println(result.attributes.get("foo"));

Origin

This is a fork from Google Code Serialized Php Parser, based on the work of Michele Catalano.