Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Closures in Zephir

Hello guys.

Zephir is already supports closure functions, but what about use a "use" keyword? This works fine:

let func1 = function() { return true; };

But

let func2 = function() use (someVar) { return true; };

throws syntax error exception.

Zephir version 0.5.8a



1.9k
Accepted
answer

The "use" part of closures is not supported yet