You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation says, that I can use a variable value as property name:
let someProperty ="myProperty";
letthis->{someProperty} =100;
But I can't use variable to access a property of class in array:
publicstaticfunctiondoSomething()
{
var _array, property;
let _array = [];
let _array["index"] =newstdClass();
let property ="test";
let _array["index"]->{property} =1;
}
Compiler throws an exception:
Zephir\ParseException: Syntax error in .../TestClass.zep on line 13
let _array["index"]->{property} = 1;
----------------------^
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/7005436-compilation-error-on-accessing-dynamic-properties?utm_campaign=plugin&utm_content=tracker%2F280146&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F280146&utm_medium=issues&utm_source=github).
The text was updated successfully, but these errors were encountered:
The documentation says, that I can use a variable value as property name:
But I can't use variable to access a property of class in array:
Compiler throws an exception:
Zephir version 0.5.9a [396cb30]
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/7005436-compilation-error-on-accessing-dynamic-properties?utm_campaign=plugin&utm_content=tracker%2F280146&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F280146&utm_medium=issues&utm_source=github).The text was updated successfully, but these errors were encountered: