note 113305 added to function.serialize

From: Date: Mon, 23 Sep 2013 22:56:11 +0000
Subject: note 113305 added to function.serialize
Groups: php.notes 
Request: Send a blank email to php-notes+get-196365@lists.php.net to get a copy of this message
Closures cannot be serialized: <?php $func = function () {echo 'hello!';}; $func(); // prints "hello!" $result = serialize($func); // Fatal error: Uncaught exception 'Exception' with message 'Serialization of 'Closure' is not allowed' ?> ---- Server IP: 69.147.83.199 Probable Submitter: 95.26.3.108 ---- Manual Page -- http://php.net/manual/en/function.serialize.php Edit -- https://master.php.net/note/edit/113305 Del: integrated -- https://master.php.net/note/delete/113305/integrated Del: useless -- https://master.php.net/note/delete/113305/useless Del: bad code -- https://master.php.net/note/delete/113305/bad+code Del: spam -- https://master.php.net/note/delete/113305/spam Del: non-english -- https://master.php.net/note/delete/113305/non-english Del: in docs -- https://master.php.net/note/delete/113305/in+docs Del: other reasons-- https://master.php.net/note/delete/113305 Reject -- https://master.php.net/note/reject/113305 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#196365) next »