Skip to main content

Serialize variable

Anatomy

<serialize var="var" var_result="var"/>

Description: SERIALIZE generates a storable representation of the structural value of a variable.

SERIALIZE is the complement of the UNSERIALIZE operation.

Attributes

NameTypeDescriptionDefined By
varvarVariable name serialize
var_resultvarResult variable name serialize

Results:

BindingTypePredicate
var_resultstringN/A

Examples

Example

<array var="names">
<item key="bg">Bill Gates</item>
<item key="sj">Steve Jobs</item>
</array>

<output>
<serialize var="names"/>
</output>

<!-- a:2:{s:2:"bg";s:10:"Bill Gates";s:2:"sj";s:10:"Steve Jobs";} -->