note 112616 added to function.create-function

From: Date: Thu, 04 Jul 2013 19:10:14 +0000
Subject: note 112616 added to function.create-function
Groups: php.notes 
Request: Send a blank email to php-notes+get-195461@lists.php.net to get a copy of this message
Wrapper for create_function, avoiding memory leaks. This is mainly for older than PHP 5.3 . <?php function create_lambda($args, $code) { static $list = array(); $hash = md5("{$args}\0{$code}"); if (!isset($list[$hash])) { $list[$hash] = create_function($args, $code); } return $list[$hash]; } ---- Server IP: 49.212.134.217 Probable Submitter: 219.209.194.119 ---- Manual Page -- http://php.net/manual/en/function.create-function.php Edit -- https://master.php.net/note/edit/112616 Del: integrated -- https://master.php.net/note/delete/112616/integrated Del: useless -- https://master.php.net/note/delete/112616/useless Del: bad code -- https://master.php.net/note/delete/112616/bad+code Del: spam -- https://master.php.net/note/delete/112616/spam Del: non-english -- https://master.php.net/note/delete/112616/non-english Del: in docs -- https://master.php.net/note/delete/112616/in+docs Del: other reasons-- https://master.php.net/note/delete/112616 Reject -- https://master.php.net/note/reject/112616 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#195461) next »