I decided to look on how artisan is initialized in Laravel 4.2 and saw function make($app)
public static function make($app)
{
$app->boot();
$console = with($console = new static('Laravel Framework', $app::VERSION))
->setLaravel($app)
->setExceptionHandler($app['exception'])
->setAutoExit(false);
$app->instance('artisan', $console);
return $console;
}
I am not really newbie in PHP but not master either... And I cannot understand wholly the meaning of (from PHP point of view)
$console = with($console = new static('Laravel Framework', $app::VERSION))
->setLaravel($app)
->setExceptionHandler($app['exception'])
->setAutoExit(false);
Here is the link to source https://github.com/laravel/framework/blob/4.2/src/Illuminate/Console/Application.php