This PHP code is an example program that demonstrates how to write anonymous functions.
<?php // This is an anonymous function that is assigned to a variable. $fnPrint = function(string $sName) { echo "Hello ".$sName."!<br />"; }; // Call the function with an argument. $fnPrint("XoaX.net"); ?>
© 20072024 XoaX.net LLC. All rights reserved.