Skip to content

Instantly share code, notes, and snippets.

@giorgiosironi
Created December 7, 2011 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giorgiosironi/1443014 to your computer and use it in GitHub Desktop.
Save giorgiosironi/1443014 to your computer and use it in GitHub Desktop.
<?php
namespace IBL {
class FranchiseMapper {}
}
namespace {
var_dump(new IBL\FranchiseMapper);
$closure = function() {
return new IBL\FranchiseMapper;
};
var_dump($closure());
}
namespace Another {
class SomeContainer
{
public function createTheMapper($closure) {
return $closure();
}
}
}
namespace {
var_dump(Another\SomeContainer::createTheMapper($closure));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment