Documentation

CheckSerializedData

CheckSerializedData(
 $str,
 $max_depth = 200,
);

The method checks serilaized string validity. Validity check must be performed always when working with an unknown source of serialized data.

Function parameters

Parameter Description
str Serialized string
max_depth Maximum object or array data nesting.

Examples of use

if (CheckSerializedData($_REQUEST["LIST_DATA"])) {
   $arData = unserialize($_REQUEST["LIST_DATA"]);
} 


© «Bitrix24», 2001-2024
Up