Question: In JavaScript you can have:

```
var blabla = function(arg){
  ...
};

```

Is there something like this in PHP?

I know about `create_function()`, but it's really complicated to stuff your code in a string argument.

Answer: 
Yes, it is available in php 5.3.X

<http://php.net/manual/en/functions.anonymous.php>

```
<?php
$greet = function($name)
{
    printf("Hello %s\r\n", $name);
};

$greet('World');
$greet('PHP');
?>

```
Anonymous functions are available since PHP 5.3.0. [link](http://php.net/manual/en/functions.anonymous.php)