Skip to content

Instantly share code, notes, and snippets.

View outtersg's full-sized avatar

Guillaume Outters outtersg

  • France
View GitHub Profile
@outtersg
outtersg / php_unserialize_to_json.sql
Last active February 28, 2024 21:57 — forked from damian358/php_unserialize_to_json.sql
PHP unserialize in Postgresql to json
/**
Decode a php serialized value to json. This function only supports basic
data types:
- arrays (will always become a json object)
- booleans
- integers
- floats
- strings
- NULL
The php_unserialize(text) function is a helper function which extracts the first value