{
  "slug": "php-serialize",
  "name": "gizza-ai/php-serialize",
  "version": "0.1.0",
  "title": "JSON to PHP serialize() Converter — gizza.ai",
  "description": "Convert JSON to PHP serialize() format in your browser — byte-accurate strings that PHP's unserialize() can read. Free, private, no sign-up.",
  "tags": [
    "php serialize",
    "json to php",
    "unserialize",
    "php session",
    "wordpress options",
    "serialized array",
    "php array",
    "interop"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/php-serialize/",
    "markdown": "https://gizza.ai/tools/php-serialize/index.md",
    "descriptor": "https://gizza.ai/tools/php-serialize/tool.json",
    "deep_link_example": "https://gizza.ai/tools/php-serialize/?json=%7B%22name%22%3A%20%22Al%22%2C%20%22age%22%3A%2030%7D"
  },
  "cli": "gizza tool php-serialize '{\"name\": \"Al\", \"age\": 30}'",
  "tool": {
    "description": "Convert JSON data into PHP's serialize() wire format so it can be read by PHP's unserialize() — useful for writing PHP sessions, caches, or WordPress options from a non-PHP system. Mapping: null -> 'N;', true/false -> 'b:1;'/'b:0;', whole numbers -> 'i:N;', fractional numbers -> 'd:N;', strings -> 's:<byte-length>:\"...\";' (length is in bytes, not characters), and both JSON arrays and objects -> PHP arrays ('a:<count>:{...}'), keyed by index or by string key respectively. Object key order is preserved.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "json": {
          "description": "The JSON value to convert to a PHP serialize() string. Any JSON type works: null, booleans, numbers, strings, arrays, and objects (objects and arrays both become PHP arrays).",
          "type": "string"
        }
      },
      "required": [
        "json"
      ],
      "type": "object"
    }
  }
}