DI -> get not work

I have some code like this:

    $di = new \Phalcon\DI\FactoryDefault();
    $di->set('url', function () use ($config) {
        $url = new \Phalcon\Mvc\Url();
        return $url;

So i want to get url with $di->get('url'), but it doesn't work. The HTTP500 error appeard. I think it is an error about phpframework.

Can anybody help me ? Thanks very much

Evan Can you check your error log and send us the output please.

Also you are using the FactoryDefault, FactoryDefault has already the url service registered : http://docs.phalcon.io/en/latest/reference/di.html#factory-default-di

Moreover, is it the first time you install phalcon on your computer ? How did you install it ?

The code works for me with the latest 1.3.0

ini_set('display_errors', 1);

could help.