Atitit php序列化 php的serialize序列化和json序列化
PHP 对不同类型的数据用不同的字母进行标示,Yahoo 开发网站提供的Using Serialized PHP with
Yahoo! Web Services 一文中给出所有的字母标示及其含义:
a - array
b - boolean
d - double
i - integer
o - common object
r - reference
s - string
C - custom object
O - class
N - null
R - pointer reference
U - unicode string
N 表示的是NULL,而b、d、i、s
作者:: ★(attilax)>>> 绰号:老哇的爪子 ( 全名::Attilax Akbar Al Rapanui 阿提拉克斯 阿克巴 阿尔 拉帕努伊 ) 汉字名:艾龙, EMAIL:1466519819@qq.com
转载请注明来源: http://www.cnblogs.com/attilax/
4.1.数组的序列化
数组(array)通常被序列化为:
a:
其中
2>……
下标的类型只能是整型或者字符串型,序列化后的格式跟整型和字符串型数据序列化后的格式相同。
数组元素值可以是任意类型,其序列化后的格式与其所对应的类型序列化后的格式相同。
4.2.对象的序列化
对象(object)通常被序列化为:
O:
2>
其中
包括在对象所在类及其祖先类中用var、public、protected 和private 声明的字段,但是不包括static 和
const 声明的静态字段。也就是说只有实例(instance)字段。
字段名是字符串型,序列化后格式与字符串型数据序列化后的格式相同。
字段值可以是任意类型,其序列化后的格式与其所对应的类型序列化后的格式相同。
但字段名的序列化与它们声明的可见性是有关的,下面重点讨论一下关于字段名的序列化。
PHP序列化_serialize_格式详解 - 低调走过 - 博客频道 - CSDN.NET.html

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Mac version
God-level code editing software (SublimeText3)