PHP code example of lombax85 / create_function
1. Go to this page and download the library: Download lombax85/create_function library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lombax85 / create_function example snippets
// Simple function
$f = create_function('$a,$b', 'return $a+$b;');
echo $f(1,2); // prints 3
// pass by reference
$f = create_function('&$a', '$a++;');
$a = 1;
$f($a);
echo $a; // prints 2