Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Ceratech/php-unserializer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP unserializer for Scala

Build Status Download Coverage Status

Library that unserializes PHP serialized strings (through PHPs serialize method.).

Supports basic values, array (also asociative) and PHP objects.

Installation

Add the following resolver to your build.sbt:

resolvers += Resolver.bintrayRepo("ceratech", "maven")

Add the following dependency to your dependencies:

libraryDependencies += "io.ceratech" %% "php-unserializer" % "0.1"

Usage

Call the unserialize method of the PHPSParser object. Like so:

PHPSParser.unserialize(inputString)

The resulting value is an Any.

Types

Parse results, given a certain input:

  • A non-asociative array in the serialized data will be parsed into a Scala list
  • A asociative array in the serialized data will be parsed into a Scala map
  • PHPs null will be parsed into a Scala None

Acknowledgements

This project is a fork from Scala PHPS cleaning up some things and adding deployment for simplified usage.

About

A Scala language reader for the PHP serialization format.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 67.1%
  • PHP 32.9%