note 66147 added to function.serialize

From: Date: Tue, 16 May 2006 00:12:29 +0000
Subject: note 66147 added to function.serialize
Groups: php.notes 
Request: Send a blank email to php-notes+get-111352@lists.php.net to get a copy of this message
<? /* Anatomy of a serialize()'ed value: String s:size:value; Integer i:value; Boolean b:value; (does not store "true" or "false", does store '1' or '0') Null N; Array a:size:{key definition;value definition;(repeated per element)} Object O:strlen(object name):object name:object size:{s:strlen(property name):property name:property definition;(repeated per property)} String values are always in double quotes Array keys are always integers or strings "null => 'value'" equates to 's:0:"";s:5:"value";', "true => 'value'" equates to 'i:1;s:5:"value";', "false => 'value'" equates to 'i:0;s:5:"value";', "array(whatever the contents) => 'value'" equates to an "illegal offset type" warning because you can't use an array as a key; however, if you use a variable containing an array as a key, it will equate to 's:5:"Array";s:5:"value";', and attempting to use an object as a key will result in the same behavior as using an array will. */ ?> ---- Server IP: 64.71.164.2 Probable Submitter: 65.100.194.45 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.serialize.php Edit -- http://master.php.net/note/edit/66147 Del: integrated -- http://master.php.net/note/delete/66147/integrated Del: useless -- http://master.php.net/note/delete/66147/useless Del: bad code -- http://master.php.net/note/delete/66147/bad+code Del: spam -- http://master.php.net/note/delete/66147/spam Del: non-english -- http://master.php.net/note/delete/66147/non-english Del: in docs -- http://master.php.net/note/delete/66147/in+docs Del: other reasons-- http://master.php.net/note/delete/66147 Reject -- http://master.php.net/note/reject/66147 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#111352) next »