note 96645 added to function.wincache-ucache-get
| From: | don dot raman at microsoft dot com | Date: | Tue, 09 Mar 2010 19:12:55 +0000 |
| Subject: | note 96645 added to function.wincache-ucache-get | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-166841@lists.php.net to get a copy of this message | ||
As per documentation PHP 5.2 doesn't support serialization of PHP internal classes. This means
code below will not work:
<?php
$d = new DateTime();
$d->format(DateTime::W3C);
wincache_ucache_set( 'q1', $d );
var_dump( wincache_ucache_get( 'q1' )->format(DATE_ATOM));
?>
The output of above code will be (as of PHP5.2.13):
[11-Feb-2010 08:35:29] PHP Warning: DateTime::format() [<a
href='datetime.format'>datetime.format</a>]: The DateTime object has not been
correctly initialized by its constructor in C:\inetpub\wwwroot\phptest\tests\ucache\wincache8.php on
line 5
And last var_dump will return bool(false).
----
Server IP: 192.41.40.227
Probable Submitter: 131.107.0.80
----
Manual Page -- http://www.php.net/manual/en/function.wincache-ucache-get.php
Edit -- https://master.php.net/note/edit/96645
Del: integrated -- https://master.php.net/note/delete/96645/integrated
Del: useless -- https://master.php.net/note/delete/96645/useless
Del: bad code -- https://master.php.net/note/delete/96645/bad+code
Del: spam -- https://master.php.net/note/delete/96645/spam
Del: non-english -- https://master.php.net/note/delete/96645/non-english
Del: in docs -- https://master.php.net/note/delete/96645/in+docs
Del: other reasons-- https://master.php.net/note/delete/96645
Reject -- https://master.php.net/note/reject/96645
Search -- https://master.php.net/manage/user-notes.php