Skip to content

Instantly share code, notes, and snippets.

@gorkamu
Created December 4, 2016 17:03
Show Gist options
  • Save gorkamu/ba7dda22ffcd8d4703561f97744db9ca to your computer and use it in GitHub Desktop.
Save gorkamu/ba7dda22ffcd8d4703561f97744db9ca to your computer and use it in GitHub Desktop.
Ejemplo de función anónima asignada a una variable
<?php
$saludo = function($nombre)
{
printf("Hola %s\r\n", $nombre);
};
$saludo('Gorkamu'); // Hola Gorkamu
$saludo('yonkis del metal'); // Hola yonkis del metal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment