PHP Serializza

Serializza JSON in PHP; array e dizionari possono non tornare alla stessa struttura.

Input: JSON strutturatoRisultato: Testo

Inserimento di testo

Esegui per vedere il risultato

Esempi

PHP Serialize array

Input

[1,"abc",true,{"x":1,"y":2}]

Expected answer

a:4:{i:0;i:1;i:1;s:3:"abc";i:2;b:1;i:3;a:2:{s:1:"x";i:1;s:1:"y";i:2;}}
PHP Serialize boolean

Input

[true, false]

Expected answer

a:2:{i:0;b:1;i:1;b:0;}
PHP Serialize empty array

Input

[]

Expected answer

a:0:{}
PHP Serialize empty object

Input

{}

Expected answer

a:0:{}
PHP Serialize float

Input

14.523

Expected answer

d:14.523;
PHP Serialize integer

Input

10

Expected answer

i:10;
PHP Serialize null

Input

null

Expected answer

N;
PHP Serialize object

Input

{"a": 10,"0": {"ab": true}}

Expected answer

a:2:{s:1:"0";a:1:{s:2:"ab";b:1;}s:1:"a";i:10;}
PHP Serialize string

Input

"Test string to serialize"

Expected answer

s:24:"Test string to serialize";

Strumenti correlati

Riordino del codice

Riferimento dell’operazione

Vedi la documentazione tecnica originale (English)