Skip to content

Instantly share code, notes, and snippets.

@aaemnnosttv
Created January 3, 2016 02:21
Show Gist options
  • Save aaemnnosttv/1b77e9300e77b4ac7748 to your computer and use it in GitHub Desktop.
Save aaemnnosttv/1b77e9300e77b4ac7748 to your computer and use it in GitHub Desktop.
Simple value callback return generator
<?php
if ( ! function_exists('__return') ) :
/**
* Simple return callback generator
*
* @param null $return
* @return Closure
*/
function __return($return = null) {
return function() use ($return) {
return $return;
};
}
endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment