note 39353 deleted from language.types.array by tomsommer
| From: | tomsommer@php.net | Date: | Sat, 03 Jul 2004 13:18:25 +0000 |
| Subject: | note 39353 deleted from language.types.array by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72418@lists.php.net to get a copy of this message | ||
Note Submitter: roland_wirth@web.de
----
There is a little problem with serializing arrays:
If you create an array with just one element...
<?php
$foo = array( 0 => 1);
?>
...and serialize and unserialize it...
<?php
$bar = unserialize(serialize($foo)); //serialize returns "a:1:{i:0;i:1}"
?>
...the result will be a boolean:
<?php
print gettype($bar); //"boolean"
?>