xp-framework/core — pull request #2 by thekid (2013-11-12 23:37:06+00:00)
Title: With

This pull request implements parts of xp-framework/rfc#172 and extends the `with` "statement" to work with `lang.Closeable` instances.

```php
with (new FileReader(__FILE__), new FileWriter('php://stdout'), function($in, $out) {
$out->write($in->read());
});
```

Both readers are closed at the end of the block regardless of whether an exception is raised.