note 108889 deleted from function.create-function by cmb
| From: | cmb@php.net | Date: | Thu, 07 Jul 2022 14:39:32 +0000 |
| Subject: | note 108889 deleted from function.create-function by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218923@lists.php.net to get a copy of this message | ||
Note Submitter: 131 dot php at cloudyks dot org
----
For those who want to create closure with create_function, don't bother, you can't.
Use create_closure instead :p
<?php
//same thing as create_function, but returns a closure..( 5.4)
function create_closure($args, $body){
return eval("return function($args){ {$body} };");
}
?>