btwael / mammouth

Unfancy PHP
http://mammouth.boutglay.com
MIT License
215 stars 22 forks source link

Simplified array_push notation #23

Closed CezaryDanielNowak closed 10 years ago

CezaryDanielNowak commented 10 years ago

http://pl1.php.net/array_push its impossible to do:

{{
x = [1,2,3]
x[] = 4
}}
btwael commented 10 years ago

See: http://mammouth.wamalaka.com/#try:{{%0Ax%20%3D%20[1%2C2%2C3]%0Ax[]%20%3D%204%0A}} Via: e4d6ed197a39c91ef21e43aa4c81b57560084694

CezaryDanielNowak commented 10 years ago

+1

CezaryDanielNowak commented 10 years ago

@x['sth'][] = 1 gives wrong result

btwael commented 10 years ago

@x['sth'][] = 1 is compiled to $this->x['sth'][] = 1;

CezaryDanielNowak commented 10 years ago

ouh looks like, i had website cached in my browser :)