diff --git a/src/Zicht/Tool/Container/Container.php b/src/Zicht/Tool/Container/Container.php
index <HASH>..<HASH> 100644
--- a/src/Zicht/Tool/Container/Container.php
+++ b/src/Zicht/Tool/Container/Container.php
@@ -162,6 +162,16 @@ class Container
         // -----------------------------------------------------------------
         // other functions
         $this->fn('sh', array($this, 'helperExec'));
+        $this->fn(
+            'defaults',
+            function(Container $c, $name, $env = null, $default = null) {
+                if (null !== $env && null !== $bin = $c->resolve('globals.' . $name . '.' . $env )) {
+                    return $bin;
+                }
+                return $default;
+            },
+            true
+        );
         $this->fn('str', array($this, 'str'));
         $this->fn(
             array('url', 'host'),
add defaults method, which can be used like:

```
# z2.yaml

globals:
    php_bin:
        testing: php<I>
```

and then in an plugin:

```
# foo.yml
taks:
    foo
       do: $(defaults("php_bin", "testing", "php")) -v

```

and gives you the possibility to for example change bins based on envs