We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Zephir bug in incrementing array element

Hey.

Seems found a bug in incrementing an array element in Zephir. Possible same presents also for the decrement.

array a = [0, 0, 1, 1];

let a[0] += 1; // 1

let a[1] = a[1] + 1; // 1

let a[2] += 1; // 1 <- expected 2

let a[3] = a[3] + 1; // 2

print_r(a);

Zephir 0.12.12, PHP 7.2.24-0ubuntu0.18.04.1



10.1k

Can you please open an issue in Github? We use the forum for questions in Github we can easily track the status. https://github.com/phalcon/zephir/issues



10.1k
Accepted
answer

Thnx! Can you close this and mark this as solved?