https://github.com/junker/php-unserialize
Common Lisp system for parsing PHP-serialized data
https://github.com/junker/php-unserialize
common-lisp php-serialization php-unserialize
Last synced: 11 months ago
JSON representation
Common Lisp system for parsing PHP-serialized data
- Host: GitHub
- URL: https://github.com/junker/php-unserialize
- Owner: Junker
- License: mit
- Created: 2024-09-16T14:09:24.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-09-17T07:27:57.000Z (over 1 year ago)
- Last Synced: 2025-01-01T01:45:33.793Z (about 1 year ago)
- Topics: common-lisp, php-serialization, php-unserialize
- Language: Common Lisp
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP-Unserialize
Common Lisp system for parsing PHP-serialized data.
## Installation
This system can be installed from [UltraLisp](https://ultralisp.org/) like this:
```lisp
(ql-dist:install-dist "http://dist.ultralisp.org/"
:prompt nil)
(ql:quickload "php-unserialize")
```
## Usage
```common-lisp
(php-unserialize:parse "i:512;a:4:{i:0;s:3:\"Red\";i:1;s:5:\"Green\";i:2;s:4:\"Blue\";i:3;a:3:{i:0;b:1;i:1;d:2.31;i:2;O:11:\"personClass\":1:{s:3:\"age\";i:12;}}}")
;; => (512 ((0 . "Red") (1 . "Green") (2 . "Blue")
;; (3 (0 . T) (1 . 2.31) (2 :OBJECT "personClass" (("age" . 12))))))
```
## Caveats
- References not supported yet
## Documentation
- [Wiki: PHP serialization format](https://en.wikipedia.org/wiki/PHP_serialization_format)