Safely decode PHP serialize() payloads (allowed_classes => false) into PHP print_r() and JSON, or serialize JSON / plain strings back into PHP serialize() format.
serialize() PayloadsPHP frameworks and CMS platforms - including WordPress (wp_options, wp_postmeta), Yii, Laravel queues, Drupal, and Magento - frequently store arrays and structured configuration in database columns or Redis caches using PHP's native serialize() format. Unlike JSON, serialized PHP strings encode explicit data types and byte lengths, such as a:2:{s:4:"name";s:5:"Alice";s:6:"active";b:1;}, which are awkward to read by eye and impossible to paste directly into JSON tools.
s:N:"...": A string of N bytes (not characters - UTF-8 multi-byte characters count as multiple bytes, so manual editing often corrupts lengths!).i:42; / d:3.14;: Integer and double (float) values.b:1; / b:0; / N;: Booleans (true/false) and NULL.a:N:{...}: An associative or indexed array with N key-value pairs.O:N:"ClassName":M:{...}: A serialized PHP object of class ClassName with M properties.allowed_classes => false important? Calling unserialize() on untrusted data without restricting classes can trigger PHP Object Injection (POP chain) vulnerabilities via magic methods like __wakeup() or __destruct(). Passing ['allowed_classes' => false] prevents any class instantiation and safely turns objects into __PHP_Incomplete_Class structures for inspection.s:15:"..."). Changing a domain name from 15 characters to 18 characters without updating the byte count breaks unserialize().