4 <?php if (!extension_loaded("pimple")) print "skip"; ?>
8 This is part of Pimple::extend() code :
10 $extended = function ($c) use ($callable, $factory) {
11 return $callable($factory($c), $c);
15 $p = new Pimple\Container();
16 $p[12] = function ($v) { var_dump($v); return 'foo';}; /* $factory in code above */
18 $c = $p->extend(12, function ($w) { var_dump($w); return 'bar'; }); /* $callable in code above */
20 var_dump($c('param'));