Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can you explain please?


In PHP you cannot call $company->remote-friendly as an object. PHP treats it as a minus sign when processing code. This is the same issue when decoding for Javascript.

I would recommend using underscore


You can in PHP [1] and JavaScript [2] - though neither is pretty, so I'd endorse this suggestion.

[1] http://stackoverflow.com/questions/2925044/hyphens-in-keys-o... [2] http://stackoverflow.com/questions/7122609/how-do-i-referenc...


Yup, There is more than one way to handle it but it's not developer-friendly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: