Created
May 29, 2012 14:20
-
-
Save filhodanuvem/2828702 to your computer and use it in GitHub Desktop.
PHP não tem closure?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$lambda = function() use($nota){ | |
echo '<br />'.$nota; | |
}; | |
function soma($v1,$v2,$f){ | |
$nota = $v1 + $v2 ; | |
$f(); | |
} | |
soma(1,2,$lambda); |
jeanpimentel
commented
May 29, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment